HTML Tags

HTML (HyperText Markup Language) is the standard language for creating web pages and web applications. HTML uses various tags to define the structure and content of a webpage. Each tag usually comes in pairs: an opening tag and a closing tag, although some tags are self-closing. Below is an overview of commonly used HTML tags:

1. Document Structure Tags

  • <!DOCTYPE>: Defines the document type and version of HTML.
  • <html>: The root element of an HTML document.
  • <head>: Contains meta-information about the document, such as the title and links to stylesheets.
  • <title>: Sets the title of the document, which appears in the browser tab.
  • <body>: Contains the content of the HTML document, such as text, images, and links.

2. Text Formatting Tags

  • <h1> to <h6>: Define headings, <h1> being the highest (or most important) and <h6> the lowest.
  • <p>: Defines a paragraph.
  • <b>: Bold text.
  • <i>: Italic text.
  • <u>: Underlined text.
  • <br>: Line break.
  • <hr>: Horizontal rule (a thematic break).

3. Links and Images

  • <a>: Defines a hyperlink.
  • <img>: Embeds an image

4. Lists

  • <ul>: Unordered list.
  • <ol>: Ordered list.
  • <li>: List item.

5. Tables

  • <table>: Defines a table.
  • <tr>: Table row.
  • <th>: Table header.
  • <td>: Table cell.

6. Forms

  • <form>: Defines a form.
  • <input>: Defines an input field.
  • <textarea>: Defines a multi-line text input field.
  • <button>: Defines a clickable button.
  • <select>: Defines a drop-down list.
  • <option>: Defines an option in a drop-down list.

7. Semantic Tags

  • <header>: Defines a header for a document or section.
  • <nav>: Defines a container for navigation links.
  • <section>: Defines a section in a document.
  • <article>: Defines an independent, self-contained content.
  • <aside>: Defines content aside from the main content (like a sidebar).
  • <footer>: Defines a footer for a document or section.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *