HTML Tag Reference

HTML Tag Reference

HTML (Hypertext Markup Language) uses various tags to structure content on a web page. Here's a reference of commonly used HTML tags along with a brief description of each:

1. Document Structure:

   - `<html>`: The root element of an HTML document.

   - `<head>`: Contains meta-information about the document.

   - `<title>`: Sets the title displayed in the browser tab.

   - `<meta>`: Provides metadata about the document, such as character encoding.

   - `<link>`: Links to external resources, typically stylesheets.

   - `<style>`: Contains inline CSS styles.

   - `<script>`: Embeds or links to JavaScript code.

   - `<body>`: Contains the visible content of the webpage.

2. Headings:

   - `<h1>` to `<h6>`: Define headings with varying levels of importance.

3. Text and Paragraphs:

   - `<p>`: Defines a paragraph of text.

   - `<br>`: Inserts a line break.

   - `<hr>`: Creates a horizontal rule (line).

   - `<strong>` or `<b>`: Indicates strong emphasis (bold).

   - `<em>` or `<i>`: Indicates emphasized text (italic).

4. Links:

   - `<a>`: Creates hyperlinks to other web pages or resources.

   - `<img>`: Embeds images.

   - `<audio>`: Embeds audio content.

   - `<video>`: Embeds video content.

6. Lists:

   - `<ul>`: Defines an unordered (bulleted) list.

   - `<ol>`: Defines an ordered (numbered) list.

   - `<li>`: Represents a list item within `<ul>` or `<ol>`.

   - `<dl>`: Defines a description list.

   - `<dt>`: Represents a term in a description list.

   - `<dd>`: Represents the description of a term in a description list.

8. Tables:

   - `<table>`: Defines a table.

   - `<thead>`, `<tbody>`, `<tfoot>`: Organize table content into sections.

   - `<tr>`: Represents a table row.

   - `<th>`: Defines a table header cell.

   - `<td>`: Defines a table data cell.

   - `<caption>`: Provides a caption for the table.

10. Forms:

    - `<form>`: Creates a form to collect user input.

    - `<input>`: Defines an input field within a form.

    - `<textarea>`: Defines a multiline text input field.

    - `<button>`: Represents a clickable button.

    - `<select>`: Creates a dropdown list.

    - `<option>`: Represents an option in a dropdown list.

    - `<label>`: Associates a label with a form control.

    - `<fieldset>`: Groups related form elements.

    - `<legend>`: Provides a title for a `<fieldset>`.

12. Semantic Elements:

    - `<header>`: Represents a container for introductory content.

    - `<nav>`: Defines navigation links.

    - `<article>`: Represents a self-contained composition.

    - `<section>`: Defines a section within a document.

    - `<aside>`: Represents content that is tangentially related to the content around it.

    - `<footer>`: Represents the footer of a section or document.

14. Miscellaneous:

    - `<div>`: Defines a generic container for grouping elements.

    - `<span>`: Defines an inline container for styling or scripting.

    - `<iframe>`: Embeds an inline frame or other external content.


These are some of the most commonly used HTML tags, but HTML provides many more for various purposes. Understanding how to use these tags and their attributes is crucial for building web pages and web applications.

Comments

Archive

Followers