HTML Tags Reference
HTML (HyperText Markup Language) uses various tags to structure and present content on web pages.
Basic Structure Tags:
- <!DOCTYPE html> - Defines the document type.
- <html> - Root element of an HTML page.
- <head> - Contains meta-information about the document.
- <title> - Sets the title of the web page.
- <body> - Contains the main content of the page.
Text Formatting Tags:
- <h1> to <h6> - Headings (largest to smallest).
- <p> - Paragraph.
- <b> - Bold text.
- <i> - Italic text.
- <u> - Underlined text.
- <strong> - Important (bold).
- <em> - Emphasized (italic).
- <mark> - Highlighted text.
- <small> - Smaller text.
- <sub> - Subscript text.
- <sup> - Superscript text.
- <blockquote> - Quoted text.
- <pre> - Preformatted text.
Links and Media:
- <a href="URL"> - Creates a hyperlink.
- <img src="[Link]" alt="description"> - Displays an image.
- <audio> - Embeds audio files.
- <video> - Embeds video files.
- <iframe> - Embeds another webpage.
Lists:
- <ul> - Unordered list.
- <ol> - Ordered list.
- <li> - List item.
- <dl> - Definition list.
- <dt> - Term in a definition list.
- <dd> - Definition of the term.
Tables:
- <table> - Defines a table.
- <tr> - Table row.
- <th> - Table header cell.
- <td> - Table data cell.
- <caption> - Table caption.
Forms and Inputs:
- <form> - Creates a form.
- <input> - Input field (text, checkbox, radio, etc.).
- <textarea> - Multi-line text input.
- <button> - Clickable button.
- <select> - Dropdown list.
- <option> - Option in a dropdown.
- <label> - Label for an input field.
Divisions and Spans:
- <div> - Block-level container.
- <span> - Inline container.
Semantic Elements:
- <header> - Defines a header section.
- <nav> - Defines navigation links.
- <section> - Section of content.
- <article> - Self-contained content.
- <aside> - Sidebar content.
- <footer> - Defines a footer section.
Meta and Scripting:
- <meta> - Provides metadata.
- <link> - Links external files (CSS).
- <script> - Embeds JavaScript.
- <style> - Embeds CSS styles.