!DOCTYPE html

Declares the document type and version of HTML.

<!DOCTYPE html>

html

The root element of an HTML document.

<html lang="en">

head

Contains meta-information about the document.

<head>
    <title>My Webpage</title>
</head>

title

Sets the title of the HTML document (displayed in the browser tab).

<title>My Webpage</title>

body

Contains the content of the HTML document.

<body>
    <h1>Hello, World!</h1>
</body>

h1 to h6

Heading elements, ranging from the largest to the smallest.

<h1>This is a Heading</h1>

H1

H2

H3

H4

H5

H6

Note: These use font-sizes based on the site formatting.


p

Defines a paragraph.

<p>This is a paragraph of text.</p>

a

Creates hyperlinks.

<a href="https://www.example.com">Visit Example.com</a>
Visit Example.com

img

Embeds images.

<img src="image.jpg" alt="Description of the image">

ul

Defines an unordered (bulleted) list.

<ul>
    <li>Item 1</li>
    <li>Item 2</li>
</ul>
  • Item 1
  • Item 2

ol

Defines an ordered (numbered) list.

<ol>
    <li>First</li>
    <li>Second</li>
</ol>
  1. First
  2. Second

li

Represents a list item in ordered or unordered lists.

<ul>
    <li>Item 1</li>
    <li>Item 2</li>
</ul>
  • Item 1
  • Item 2

div

Defines a division or a section in an HTML document.

<div>
    <p>This is a division.</p>
</div>

span

Defines a small section of text within a larger block.

<p>This is <span>highlighted</span> text.</p>

This is highlighted text.


strong

Represents strong importance, typically displayed as bold.

<p>This is <strong>important</strong> text.</p>

This is important text.


em

Represents emphasized text, typically displayed as italic.

<p>This is <em>emphasized</em> text.</p>

This is emphasized text.


br

Represents a line break.

<p>This is a line of text.<br>Next line of text.</p>

This is a line of text.
Next line of text.


hr

Represents a thematic break (horizontal line).

<p>Content above<hr>Content below</p>

Content above


Content below


form

Represents an HTML form for user input.

<form action="/submit" method="post">
<label for="firstname">First Name:</label>
<input type="text" id="firstname" name="firstname" required>

<br>

<label for="lastname">Last Name:</label>
<input type="text" id="lastname" name="lastname" required>

</form>


input

Represents an input field within a form.

<input type="text" name="username" placeholder="Enter your username">

button

Represents a clickable button.

    <button type="button">Standard Button</button>
    <button type="submit">Submit Button</button>
    <button type="reset">Reset Button</button>
    <input type="image" src="image.png" alt="Image Button">
    <button type="button" disabled>Disabled Button</button>
    <button type="button">Button with onclick Event</button>
    <a href="https://example.com" class="button">Link as a Button</a>
    <button type="button" class="custom-button">Styled Button</button>
    






Link as a Button


select

Represents a drop-down list.

<select>
    <option value="option1">Option 1</option>
    <option value="option2">Option 2</option>
</select>

option

Represents an option in a <select> element.

<select>
    <option value="option1">Option 1</option>
    <option value="option2">Option 2</option>
</select>

textarea

Represents a multi-line text input control.

<textarea rows="4" cols="50">Enter text here...</textarea>

table

Represents a table.

<table>
    <tr>
        <td>Row 1, Cell 1</td>
        <td>Row 1, Cell 2</td>
    </tr>
    <tr>
        <td>Row 2, Cell 1</td>
        <td>Row 2, Cell 2</td>
    </tr>
</table>

tr

Represents a table row.

<tr>
    <td>Row 1, Cell 1</td>
    <td>Row 1, Cell 2</td>
</tr>

td

Represents a table cell.

<tr>
    <td>Row 1, Cell 1</td>
    <td>Row 1, Cell 2</td>
</tr>

th

Represents a table header cell.

<tr>
    <th>Header 1</th>
    <th>Header 2</th>
</tr>

cite

Represents the title of a creative work.

<p><cite>The Great Gatsby</cite> by F. Scott Fitzgerald</p>

blockquote

Represents a section that is a quotation from another source.

<blockquote>
    <p>This is a quotation from another source.</p>
</blockquote>

code

Represents a single line of code.

<p>Use the <code>print()</code> function to display text.</p>

pre

Represents preformatted text, maintaining both spaces and line breaks.

<pre>
    This   is   preformatted
    text with    spaces.
</pre>

abbr

Represents an abbreviation or acronym, providing a tooltip with the full form.

<p>The <abbr title="World Health Organization">WHO</abbr> is important.</p>

sup

Represents superscript text.

<p>This is 10<sup>2</sup> or 10 squared.</p>

sub

Represents subscript text.

<p>H<sub>2</sub>O is water.</p>

dfn

Represents the defining instance of a term.

<p>The <dfn>HTML</dfn> specification is maintained by the W3C.</p>

time

Represents a specific period in time.

<p>Meeting scheduled for <time datetime="2023-01-01T12:00">January 1, 2023 at 12:00 PM</time>.</p>

address

Represents contact information for the author or owner of a document.

<address>
    Written by John Doe<br>
    Visit us at: 123 Main Street
</address>

mark

Represents text highlighted for reference or notation purposes.

<p>This is <mark>important</mark> information.</p>

bdo

Overrides the current text direction.

<p><bdo dir="rtl">This text is right-to-left</bdo></p>

progress

Represents the completion progress of a task.

<progress value="70" max="100">70%</progress>

meter

Represents a scalar measurement within a known range.

<meter value="6" min="0" max="10">60%</meter>

figure

Represents any content that is referenced from the main content.

<figure>
    <img src="image.jpg" alt="Description">
    <figcaption>Caption for the image</figcaption>
</figure>

figcaption

Represents a caption or legend for a <figure> element.

<figure>
    <img src="image.jpg" alt="Description">
    <figcaption>Caption for the image</figcaption>
</figure>

iframe

Represents an inline frame for embedding external content.

<iframe src="https://www.example.com" width="600" height="400" frameborder="0"></iframe>

audio

Embeds sound content in the document.

<audio controls>
    <source src="audio.mp3" type="audio/mp3">
    Your browser does not support the audio tag.
</audio>

video

Embeds video content in the document.

<video width="320" height="240" controls>
    <source src="movie.mp4" type="video/mp4">
    Your browser does not support the video tag.
</video>

datalist

Contains a set of <option> elements for use with <input> elements.

<input list="browsers" name="browser" id="browser">
<datalist id="browsers">
    <option value="Chrome">
    <option value="Firefox">
    <option value="Safari">
    <option value="Edge">
    <option value="Opera">
</datalist>