HTML

HTML Tags


HTML tags are composed of opening and closing tags, which enclose content to define the structure and appearance of the content. Here's some importan  HTML tags:

1. Document Structure:

  • <!DOCTYPE html>: Document type declaration.
  • <html>: Root element.
  • <head>: Contains meta-information about the HTML document.
  • <title>: Sets the title of the HTML document.
  • <body>: Contains the content of the HTML document.

2. Headings:

  • <h1> to <h6>: Define headings (from largest to smallest).

3. Text Formatting:

  • <p>: Defines a paragraph.
  • <b>: Bold text.
  • <i>: Italic text.
  • <u>: Underlined text.
  • <strong>: Strong importance (typically rendered as bold).
  • <em>: Emphasized text (typically rendered as italic).
<audio>: Embeds sound content.
<video>: Embeds video content.

4. Links:

  • <a>: Defines a hyperlink.
  • <link>: Defines a link to an external resource (commonly used in the head for stylesheets).

5. Lists:

  • <ul>: Defines an unordered list.
  • <ol>: Defines an ordered list.
  • <li>: Defines a list item.
  • <dl>: Defines a description list.
  • <dt>: Defines a term (in a description list).
  • <dd>: Defines a description (in a description list).

6. Images:

  • <img>: Embeds an image.

7. Tables:

  • <table>: Defines a table.
  • <tr>: Defines a table row.
  • <th>: Defines a table header cell.
  • <td>: Defines a table data cell.
  • <thead>, <tbody>, <tfoot>: Groups header, body, and footer content in a table.

8. Forms:

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

9. Semantic HTML:

  • <header>, <footer>, <nav>, <main>, <article>, <section>: Semantic tags for document structure.

10. Media:

  • <audio>: Embeds sound content.
  • <video>: Embeds video content.

11. Miscellaneous:

  • <div>: Defines a generic container.
  • <span>: Defines a generic inline container.
  • <br>: Represents a line break.
  • <hr>: Represents a horizontal rule.