HTML Tag Examples and Explanations

Structural Tags

<html>: Represents the root of an HTML document.

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

<title>: Sets the title of the HTML document.

<body>: Contains the content of the HTML document.

Heading Tags

<h1> to <h6>: Define headings of different levels.

Paragraph Tags

<p>: Defines a paragraph.

Formatting Tags

<strong> or <b>: Represents strong importance or bold text.

<em> or <i>: Represents emphasized text or italic text.

<u>: Represents underlined text.

List Tags

<ul>: Defines an unordered list.

<ol>: Defines an ordered list.

<li>: Defines a list item.

Anchor Tag

<a>: Defines a hyperlink for creating links to other pages or resources.

Image Tag

<img>: Embeds images into the document.

Table Tags

<table>: Defines a table.

<tr>: Defines a table row.

<td>: Defines a table cell (data cell).

<th>: Defines a table header cell.

Form Tags

<form>: Defines an HTML form for user input.

<input>: Defines an input field.

<button>: Defines a clickable button.

Division Tag

<div>: Represents a division or section in an HTML document.

Span Tag

<span>: Used for applying styles to a specific part of text within a larger element.

Comment Tags

<!-- Comment -->: Used to add comments in the HTML code.