0% found this document useful (0 votes)
5 views4 pages

HTML_Tags

The document provides a comprehensive overview of HTML tags, including their structure, types, and usage. It categorizes tags into basic tags, headings, formatting, lists, links, images, tables, forms, semantic tags, scripting, styles, and other important tags, along with their attributes. Additionally, it outlines global and common attributes that can modify the behavior or appearance of HTML elements.

Uploaded by

sameergill9595
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

HTML_Tags

The document provides a comprehensive overview of HTML tags, including their structure, types, and usage. It categorizes tags into basic tags, headings, formatting, lists, links, images, tables, forms, semantic tags, scripting, styles, and other important tags, along with their attributes. Additionally, it outlines global and common attributes that can modify the behavior or appearance of HTML elements.

Uploaded by

sameergill9595
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

HTML Tags (Elements)

HTML tags define the structure and content of a web page. Tags typically come in pairs (e.g., <tag> and
</tag>), but some are self-closing.

-----------------------------------------------------------------------------------------------------------------------------------

Basic Tags

• <html>: Root element of an HTML document.


• <head>: Contains metadata and links to external resources.
• <body>: Contains the visible page content.
• <title>: Specifies the title of the document.
• <meta>: Defines metadata about the document (e.g., charset, viewport).

Headings and Paragraphs

• <h1> to <h6>: Headings (largest to smallest).


• <p>: Paragraph.
• <br>: Line break.
• <hr>: Horizontal rule.

Formatting Tags

• <b>: Bold text.


• <strong>: Strong importance (usually bold).
• <i>: Italic text.
• <em>: Emphasized text (usually italic).
• <u>: Underlined text.
• <small>: Smaller text.
• <mark>: Highlighted text.
• <del>: Strikethrough text.
• <ins>: Inserted text (underlined).
• <sup>: Superscript text.
• <sub>: Subscript text.

Lists

• <ul>: Unordered list.


• <ol>: Ordered list.
• <li>: List item.
• <dl>: Definition list.
• <dt>: Definition term.
• <dd>: Definition description.

Links and Navigation

• <a>: Hyperlink.
• <nav>: Navigation section.
• <button>: Clickable button.

Images and Media

• <img>: Image.
• <figure>: Figure container (image + caption).
• <figcaption>: Figure caption.
• <audio>: Audio content.
• <video>: Video content.
• <source>: Media source for <audio> or <video>.

Tables

• <table>: Table.
• <tr>: Table row.
• <td>: Table cell.
• <th>: Table header cell.
• <thead>: Table header group.
• <tbody>: Table body group.
• <tfoot>: Table footer group.
• <caption>: Table caption.
• <col>: Defines column properties.
• <colgroup>: Groups columns.

Forms

• <form>: Form container.


• <input>: Input field.
• <textarea>: Multiline input field.
• <label>: Label for a form element.
• <fieldset>: Group of related form controls.
• <legend>: Title for <fieldset>.
• <select>: Dropdown list.
• <option>: Option in a dropdown.
• <optgroup>: Group of options.
• <button>: Button.
• <datalist>: List of predefined options for input.
• <output>: Displays calculation result.
• <progress>: Progress bar.
• <meter>: Measurement value.

Semantic Tags

• <header>: Page or section header.


• <footer>: Page or section footer.
• <main>: Main content area.
• <section>: Thematic grouping of content.
• <article>: Independent content block.
• <aside>: Sidebar or related content.
• <div>: Generic container.
• <span>: Inline container.

Scripting

• <script>: Embeds JavaScript.


• <noscript>: Fallback content when JavaScript is disabled.

Styles

• <style>: CSS styles within the document.


• <link>: Links to external stylesheets.

Meta Information

• <meta>: Metadata about the document.


• <base>: Base URL for relative URLs.

Other Important Tags

• <canvas>: Drawing area for graphics.


• <svg>: Scalable Vector Graphics.
• <iframe>: Embeds another webpage.
• <object>: Embeds an object like a plugin.
• <embed>: Embeds external content.
HTML Attributes

Attributes modify the behavior or appearance of HTML tags. They are written inside the opening tag.

Global Attributes

These attributes apply to almost all HTML elements:

• class: Specifies a CSS class.


• id: Unique identifier for an element.
• style: Inline CSS styles.
• title: Tooltip text.
• lang: Language of the element’s content.
• dir: Text direction (ltr, rtl).
• data-*: Custom data attributes.

Common Attributes

• src: Source of an image, video, or script.


• href: URL of a link.
• alt: Alternative text for an image.
• type: Type of input, button, or script.
• value: Value of input or option.
• name: Name of an element.
• placeholder: Placeholder text for input.
• disabled: Disables an element.
• readonly: Makes an input read-only.
• required: Makes an input field mandatory.
• checked: Pre-selects a checkbox or radio button.
• selected: Pre-selects an option in a dropdown.
• rows, cols: Dimensions for <textarea>.
• maxlength: Maximum length of text input.

You might also like