HTML Elements

HTML Elements

HTML (Hypertext Markup Language) uses various elements to structure and present content on web pages. Here are some commonly used HTML elements:

  1. <html>: The root element that encapsulates the entire HTML document.
  2. <head>: Contains metadata about the HTML document, such as the title, character encoding, and links to external stylesheets or scripts.
  3. <title>: Specifies the title of the web page, which appears in the browser’s title bar or tab.
  4. <body>: Encloses the visible content of the web page, including text, images, links, and other elements.
  5. <h1> to <h6>: Heading elements used to define different levels of headings, with <h1> being the highest and <h6> the lowest.
  6. <p>: Represents a paragraph of text.
  7. <a>: Creates a hyperlink or anchor element that links to another web page, a specific section within the same page, or an external resource.
  8. <img>: Inserts an image into the web page, with attributes specifying the image source, alt text, dimensions, and more.
  9. <ul> and <ol>: Used to create unordered (bulleted) and ordered (numbered) lists, respectively. List items are defined with the <li> element.
  10. <div>: A generic container that groups and organizes other elements. It is commonly used for styling purposes or to structure sections of the web page.
  11. <span>: Similar to <div>, it is a generic container but is inline by default. It is often used to apply styles or manipulate specific portions of text within a line.
  12. <table>: Creates a table with rows defined by <tr> (table row), columns defined by <td> (table data), and headers defined by <th> (table header).
  13. <form>: Establishes a form for user input. It contains various input elements like text fields, checkboxes, radio buttons, and submit buttons.
  14. <input>: Defines an input field within a form, allowing users to enter data. Attributes specify the type of input (text, password, checkbox, etc.), name, and other properties.
  15. <button>: Represents a clickable button that performs an action when clicked. It can be used within or outside of a form.
  16. <textarea>: Creates a multi-line text input field for users to enter longer text or comments.
  17. <header>, <nav>, <main>, <section>, <article>, <aside>, <footer>: Semantic elements used to structure different parts of the web page, aiding in accessibility and SEO optimization.

These are just a few examples of HTML elements. HTML provides a wide range of elements to structure and format content, create interactive forms, and add multimedia elements to web pages. Web developers use a combination of these elements to create visually appealing and interactive websites.

Share this post
[social_warfare]
Web page components
MS Front page

Get industry recognized certification – Contact us

keyboard_arrow_up