!--...-- | Defines a comment | Document Structure | Root | None | No | <!-- This is a comment --> |
!DOCTYPE | Specifies the document type | Document Structure | Root | None | No | <!DOCTYPE html> |
a | Defines a hyperlink | Text Content | Inline Text | href, target, rel, download | No | <a href="https://example.com">Link</a> |
abbr | Defines an abbreviation or acronym | Text Content | Inline Text | title | No | <abbr title="World Health Organization">WHO</abbr> |
acronym | Defines an acronym | Text Content | Inline Text | title | Yes (HTML5). Use <abbr> instead. Deprecated to improve semantic markup. | <acronym title="As Soon As Possible">ASAP</acronym> |
address | Defines contact information for the author/owner of a document | Text Content | Block-level Text | None | No | <address>Written by <a href="mailto:webmaster@example.com">Jon Doe</a>.</address> |
applet | Embeds a Java applet | Multimedia and Embedded Content | Embedded Content | code, object | Yes (HTML4.01, removed in HTML5). Use <object> instead. Deprecated due to security concerns and obsolescence of Java applets. | <applet code="Game.class" width="250" height="350">Java applet</applet> |
area | Defines an area inside an image map | Multimedia and Embedded Content | Images and Graphics | shape, coords, href, alt | No | <area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm"> |
article | Defines an independent, self-contained content | Document Structure | Content Sectioning | None | No | <article><h1>Article Title</h1><p>Article content...</p></article> |
aside | Defines content aside from the page content | Document Structure | Content Sectioning | None | No | <aside><h4>Sidebar</h4><p>Some sidebar content...</p></aside> |
audio | Embeds sound content in documents | Multimedia and Embedded Content | Audio and Video | src, controls, autoplay, loop | No | <audio controls><source src="audio.mp3" type="audio/mpeg">Your browser does not support the audio element.</audio> |
b | Specifies bold text | Text Content | Inline Text | None | No | <b>This text is bold</b> |
base | Specifies the base URL/target for all relative URLs in a document | Document Structure | Document Metadata | href, target | No | <base href="https://www.example.com/" target="_blank"> |
basefont | Specifies a default color, size, and font for all text in a document | Text Content | Inline Text | color, face, size | Yes (HTML4, removed in HTML5). Use CSS instead. Deprecated to separate structure from presentation. | <basefont color="red" size="3" face="Arial"> |
bdi | Isolates a part of text that might be formatted in a different direction from other text outside it | Text Content | Inline Text | None | No | <p>This text is in English, but the next word is <bdi>عربي</bdi> which is Arabic.</p> |
bdo | Overrides the current text direction | Text Content | Inline Text | dir | No | <bdo dir="rtl">This text will go right-to-left</bdo> |
big | Defines bigger text | Text Content | Inline Text | None | Yes (HTML5). Use CSS font-size instead. Deprecated to separate structure from presentation. | <big>This text is bigger</big> |
blockquote | Defines a section that is quoted from another source | Text Content | Block-level Text | cite | No | <blockquote cite="http://www.example.com">Here is a long quotation...</blockquote> |
body | Defines the document's body | Document Structure | Content Sectioning | None | No | <body><h1>This is a heading</h1><p>This is a paragraph.</p></body> |
br | Defines a single line break | Text Content | Inline Text | None | No | <p>This is a paragraph<br>with a line break.</p> |
button | Defines a clickable button | Data Representation | Forms | type, name, value, disabled | No | <button type="button">Click me!</button> |
canvas | Used to draw graphics, on the fly, via scripting (usually JavaScript) | Multimedia and Embedded Content | Images and Graphics | width, height | No | <canvas id="myCanvas" width="200" height="100"></canvas> |
caption | Defines a table caption | Data Representation | Tables | None | No | <table><caption>Monthly savings</caption><tr><th>Month</th><th>Savings</th></tr></table> |
center | Defines centered text | Text Content | Block-level Text | None | Yes (HTML4, removed in HTML5). Use CSS text-align: center instead. Deprecated to separate structure from presentation. | <center>This text is centered</center> |
cite | Defines the title of a work | Text Content | Inline Text | None | No | <p><cite>The Scream</cite> by Edvard Munch. Painted in 1893.</p> |
code | Defines a piece of computer code | Text Content | Inline Text | None | No | <code>var person = {firstName:"John", lastName:"Doe"};</code> |
col | Specifies column properties for each column within a <colgroup> element | Data Representation | Tables | span | No | <table><colgroup><col span="2" style="background-color:red"><col style="background-color:yellow"></colgroup></table> |
colgroup | Specifies a group of one or more columns in a table for formatting | Data Representation | Tables | span | No | <table><colgroup><col span="2" style="background-color:red"><col style="background-color:yellow"></colgroup></table> |
data | Links the given content with a machine-readable translation | Text Content | Inline Text | value | No | <data value="398">Mini Ketchup</data> |
datalist | Specifies a list of pre-defined options for input controls | Data Representation | Forms | None | No | <input list="browsers"><datalist id="browsers"><option value="Chrome"><option value="Firefox"></datalist> |
dd | Defines a description/value of a term in a description list | Text Content | Lists | None | No | <dl><dt>Coffee</dt><dd>Black hot drink</dd></dl> |
del | Defines text that has been deleted from a document | Text Content | Inline Text | cite, datetime | No | <p>My favorite color is <del>blue</del> <ins>red</ins>!</p> |
details | Defines additional details that the user can view or hide | Interactive Elements | | open | No | <details><summary>Copyright 2021.</summary><p>All rights reserved.</p></details> |
dfn | Specifies a term that is going to be defined within the content | Text Content | Inline Text | None | No | <p><dfn>HTML</dfn> is the standard markup language for creating web pages.</p> |
dialog | Defines a dialog box or window | Interactive Elements | | open | No | <dialog open><p>Greetings, everyone!</p></dialog> |
dir | Defines a directory list | Text Content | Lists | compact | Yes (HTML5). Use <ul> instead. Deprecated due to lack of semantic meaning. | <dir><li>html</li><li>xhtml</li><li>css</li></dir> |
div | Defines a section in a document | Text Content | Block-level Text | None | No | <div><h2>This is a heading in a div element</h2><p>This is some text in a div element.</p></div> |
dl | Defines a description list | Text Content | Lists | None | No | <dl><dt>Coffee</dt><dd>Black hot drink</dd><dt>Milk</dt><dd>White cold drink</dd></dl> |
dt | Defines a term/name in a description list | Text Content | Lists | None | No | <dl><dt>Coffee</dt><dd>Black hot drink</dd></dl> |
em | Defines emphasized text | Text Content | Inline Text | None | No | <p>This is <em>emphasized</em> text.</p> |
embed | Defines a container for an external application or interactive content | Multimedia and Embedded Content | Embedded Content | src, type, width, height | No | <embed src="helloworld.swf" type="application/x-shockwave-flash" width="300" height="200"> |
fieldset | Groups related elements in a form | Data Representation | Forms | disabled, form, name | No | <fieldset><legend>Personalia:</legend><label>Name: <input type="text"></label></fieldset> |
figcaption | Defines a caption for a <figure> element | Multimedia and Embedded Content | Images and Graphics | None | No | <figure><img src="pic.jpg" alt="My Image"><figcaption>Fig.1 - My Image</figcaption></figure> |
figure | Specifies self-contained content | Multimedia and Embedded Content | Images and Graphics | None | No | <figure><img src="pic.jpg" alt="My Image"><figcaption>Fig.1 - My Image</figcaption></figure> |
font | Defines font, color, and size for text | Text Content | Inline Text | color, face, size | Yes (HTML4, removed in HTML5). Use CSS instead. Deprecated to separate structure from presentation. | <font color="red" size="3" face="Verdana">This is some text!</font> |
footer | Defines a footer for a document or section | Document Structure | Content Sectioning | None | No | <footer><p>© 2021 My Company</p></footer> |
form | Defines an HTML form for user input | Data Representation | Forms | action, method, name, target | No | <form action="/submit-form" method="post"><input type="text" name="username"><input type="submit"></form> |
frame | Defines a window (a frame) in a frameset | Document Structure | Content Sectioning | src, name, frameborder, scrolling | Yes (HTML5). Use <iframe> or CSS instead. Deprecated due to usability and accessibility concerns. | <frameset cols="25%,75%"><frame src="frame_a.htm"><frame src="frame_b.htm"></frameset> |
frameset | Defines a set of frames | Document Structure | Content Sectioning | cols, rows | Yes (HTML5). Use CSS to create layouts instead. Deprecated due to usability and accessibility concerns. | <frameset cols="25%,50%,25%"><frame src="frame_a.htm"><frame src="frame_b.htm"><frame src="frame_c.htm"></frameset> |
h1 to h6 | Defines HTML headings | Text Content | Block-level Text | None | No | <h1>This is heading 1</h1><h2>This is heading 2</h2><h3>This is heading 3</h3> |
head | Contains metadata/information for the document | Document Structure | Document Metadata | None | No | <head><title>Page Title</title></head> |
header | Defines a header for a document or section | Document Structure | Content Sectioning | None | No | <header><h1>Welcome to My Website</h1><p>A site about web development</p></header> |
hgroup | Groups heading elements | Document Structure | Content Sectioning | None | Yes (HTML5), but reintroduced in HTML 5.2. Use individual heading elements instead when deprecated. Deprecated due to lack of widespread use and potential confusion. | <hgroup><h1>Main Title</h1><h2>Subtitle</h2></hgroup> |
hr | Defines a thematic change in the content | Text Content | Block-level Text | None | No | <p>This is some text</p><hr><p>This is some other text</p> |
html | Defines the root of an HTML document | Document Structure | Root | xmlns, lang | No | <html lang="en"><head><title>Page Title</title></head><body></body></html> |
i | Defines a part of text in an alternate voice or mood | Text Content | Inline Text | None | No | <p>He thought, <i>This can't be real!</i></p> |
iframe | Defines an inline frame | Multimedia and Embedded Content | Embedded Content | src, width, height, name, sandbox | No | <iframe src="https://www.example.com" width="500" height="300"></iframe> |
img | Defines an image | Multimedia and Embedded Content | Images and Graphics | src, alt, width, height | No | <img src="image.jpg" alt="Description of image" width="500" height="300"> |
input | Defines an input control | Data Representation | Forms | type, name, value, required, placeholder | No | <input type="text" name="username" placeholder="Enter username"> |
ins | Defines a text that has been inserted into a document | Text Content | Inline Text | cite, datetime | No | <p>My favorite color is <del>blue</del> <ins>red</ins>!</p> |
kbd | Defines keyboard input | Text Content | Inline Text | None | No | <p>Press <kbd>Ctrl</kbd> + <kbd>C</kbd> to copy text.</p> |
label | Defines a label for an <input> element | Data Representation | Forms | for | No | <label for="username">Username:</label><input type="text" id="username"> |
legend | Defines a caption for a <fieldset> element | Data Representation | Forms | None | No | <fieldset><legend>Personal Information:</legend><input type="text" name="firstname"></fieldset> |
li | Defines a list item | Text Content | Lists | value | No | <ul><li>First item</li><li>Second item</li></ul> |
link | Defines the relationship between a document and an external resource | Document Structure | Document Metadata | href, rel, type | No | <link rel="stylesheet" href="styles.css"> |
main | Specifies the main content of a document | Document Structure | Content Sectioning | None | No | <main><h1>Most Important Content</h1><p>This is the main content of the webpage.</p></main> |
map | Defines an image map | Multimedia and Embedded Content | Images and Graphics | name | No | <img src="image.jpg" alt="Image Map" usemap="#workmap"><map name="workmap"><area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm"></map> |
mark | Defines marked/highlighted text | Text Content | Inline Text | None | No | <p>Do not forget to <mark>buy milk</mark> today.</p> |
menu | Defines a list/menu of commands | Interactive Elements | | type | No | <menu><li><button onclick="copy()">Copy</button></li><li><button onclick="cut()">Cut</button></li></menu> |
meta | Defines metadata about an HTML document | Document Structure | Document Metadata | name, content, charset, http-equiv | No | <meta charset="UTF-8"><meta name="description" content="Free Web tutorials"> |
meter | Defines a scalar measurement within a known range | Data Representation | Forms | value, min, max, low, high, optimum | No | <meter value="2" min="0" max="10">2 out of 10</meter> |
nav | Defines navigation links | Document Structure | Content Sectioning | None | No | <nav><a href="/html/">HTML</a> | <a href="/css/">CSS</a> | <a href="/js/">JavaScript</a></nav> |
noframes | Defines an alternate content for users that do not support frames | Document Structure | Content Sectioning | None | Yes (HTML5). Use CSS for layout instead. Deprecated along with frames due to accessibility and usability concerns. | <noframes><body>Your browser does not support frames.</body></noframes> |
noscript | Defines an alternate content for users that do not support client-side scripts | Scripting and Styling | Scripting | None | No | <noscript>Your browser does not support JavaScript!</noscript> |
object | Defines an embedded object | Multimedia and Embedded Content | Embedded Content | data, type, width, height | No | <object data="movie.mp4" width="400" height="300"></object> |
ol | Defines an ordered list | Text Content | Lists | reversed, start, type | No | <ol><li>First item</li><li>Second item</li><li>Third item</li></ol> |
optgroup | Defines a group of related options in a drop-down list | Data Representation | Forms | label, disabled | No | <select><optgroup label="Swedish Cars"><option value="volvo">Volvo</option><option value="saab">Saab</option></optgroup></select> |
option | Defines an option in a drop-down list | Data Representation | Forms | value, selected, disabled | No | <select><option value="volvo">Volvo</option><option value="saab">Saab</option></select> |
output | Defines the result of a calculation | Data Representation | Forms | for, form, name | No | <form oninput="x.value=parseInt(a.value)+parseInt(b.value)"><input type="range" id="a" value="50">+<input type="number" id="b" value="25">=<output name="x" for="a b"></output></form> |
p | Defines a paragraph | Text Content | Block-level Text | None | No | <p>This is a paragraph.</p> |
param | Defines a parameter for an object | Multimedia and Embedded Content | Embedded Content | name, value | No | <object data="movie.swf"><param name="autoplay" value="true"></object> |
picture | Defines a container for multiple image resources | Multimedia and Embedded Content | Images and Graphics | None | No | <picture><source media="(min-width:650px)" srcset="img_pink_flowers.jpg"><img src="img_white_flower.jpg" alt="Flowers"></picture> |
pre | Defines preformatted text | Text Content | Block-level Text | None | No | <pre>Text in a pre element is displayed in a fixed-width font, and preserves both spaces and line breaks</pre> |
progress | Represents the progress of a task | Data Representation | Forms | value, max | No | <progress value="22" max="100"></progress> |
q | Defines a short quotation | Text Content | Inline Text | cite | No | <p>WWF's goal is to: <q>Build a future where people live in harmony with nature.</q></p> |
rp | Defines what to show in browsers that do not support ruby annotations | Text Content | Inline Text | None | No | <ruby>漢 <rp>(</rp><rt>ㄏㄢˋ</rt><rp>)</rp></ruby> |
rt | Defines an explanation/pronunciation of characters (for East Asian typography) | Text Content | Inline Text | None | No | <ruby>漢 <rt>ㄏㄢˋ</rt></ruby> |
ruby | Defines a ruby annotation (for East Asian typography) | Text Content | Inline Text | None | No | <ruby>漢 <rt>ㄏㄢˋ</rt></ruby> |
s | Defines text that is no longer correct | Text Content | Inline Text | None | No | <p><s>My car is blue.</s> My new car is silver.</p> |
samp | Defines sample output from a computer program | Text Content | Inline Text | None | No | <p>Message from my computer:</p><p><samp>File not found.<br>Press F1 to continue</samp></p> |
script | Defines a client-side script | Scripting and Styling | Scripting | src, type, async, defer | No | <script src="script.js"></script> |
search | Defines a search section | Document Structure | Content Sectioning | None | No | <search><form><input type="search"><button>Search</button></form></search> |
section | Defines a section in a document | Document Structure | Content Sectioning | None | No | <section><h1>WWF</h1><p>The World Wide Fund for Nature (WWF) is an international organization working on issues regarding the conservation, research and restoration of the environment.</p></section> |
select | Defines a drop-down list | Data Representation | Forms | name, multiple, size | No | <select name="cars"><option value="volvo">Volvo</option><option value="saab">Saab</option><option value="fiat">Fiat</option></select> |
small | Defines smaller text | Text Content | Inline Text | None | No | <p>This is some normal text. <small>This is some smaller text.</small></p> |
source | Defines multiple media resources for media elements (<video> and <audio>) | Multimedia and Embedded Content | Audio and Video | src, type, media | No | <video width="320" height="240" controls><source src="movie.mp4" type="video/mp4"><source src="movie.ogg" type="video/ogg"></video> |
span | Defines a section in a document | Text Content | Inline Text | None | No | <p>My mother has <span style="color:blue">blue</span> eyes.</p> |
strike | Defines strikethrough text | Text Content | Inline Text | None | Yes (HTML5). Use <s> or <del> instead. Deprecated to improve semantic markup. | <p><strike>This text is strikethrough.</strike></p> |
strong | Defines important text | Text Content | Inline Text | None | No | <strong>This text is important!</strong> |
style | Defines style information for a document | Scripting and Styling | Styling | type, media | No | <style>body {background-color: powderblue;}</style> |
sub | Defines subscripted text | Text Content | Inline Text | None | No | <p>H<sub>2</sub>O is the chemical formula for water.</p> |
summary | Defines a visible heading for a <details> element | Interactive Elements | | None | No | <details><summary>Copyright 2021</summary><p>All rights reserved.</p></details> |
sup | Defines superscripted text | Text Content | Inline Text | None | No | <p>The 4<sup>th</sup> of July is American Independence Day.</p> |
svg | Defines a container for SVG graphics | Multimedia and Embedded Content | Images and Graphics | width, height | No | <svg width="100" height="100"><circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" /></svg> |
table | Defines a table | Data Representation | Tables | border | No | <table><tr><th>Header 1</th><th>Header 2</th></tr><tr><td>row 1, cell 1</td><td>row 1, cell 2</td></tr></table> |
tbody | Groups the body content in a table | Data Representation | Tables | None | No | <table><thead><tr><th>Month</th><th>Savings</th></tr></thead><tbody><tr><td>January</td><td>$100</td></tr></tbody></table> |
td | Defines a cell in a table | Data Representation | Tables | colspan, rowspan | No | <table><tr><td>Cell 1</td><td>Cell 2</td></tr></table> |
template | Defines a template | Web Components | | None | No | <template><h2>Flower</h2><img src="img_white_flower.jpg"></template> |
textarea | Defines a multiline input control (text area) | Data Representation | Forms | name, rows, cols | No | <textarea name="message" rows="10" cols="30">The cat was playing in the garden.</textarea> |
tfoot | Groups the footer content in a table | Data Representation | Tables | None | No | <table><thead><tr><th>Month</th><th>Savings</th></tr></thead><tbody><tr><td>January</td><td>$100</td></tr></tbody><tfoot><tr><td>Sum</td><td>$180</td></tr></tfoot></table> |
th | Defines a header cell in a table | Data Representation | Tables | colspan, rowspan, scope | No | <table><tr><th>Month</th><th>Savings</th></tr><tr><td>January</td><td>$100</td></tr></table> |
thead | Groups the header content in a table | Data Representation | Tables | None | No | <table><thead><tr><th>Month</th><th>Savings</th></tr></thead><tbody><tr><td>January</td><td>$100</td></tr></tbody></table> |
time | Defines a date/time | Text Content | Inline Text | datetime | No | <p>We open at <time>10:00</time> every morning.</p> |
title | Defines a title for the document | Document Structure | Document Metadata | None | No | <title>HTML Reference</title> |
tr | Defines a row in a table | Data Representation | Tables | None | No | <table><tr><td>Cell 1</td><td>Cell 2</td></tr></table> |
track | Defines text tracks for media elements (<video> and <audio>) | Multimedia and Embedded Content | Audio and Video | src, kind, srclang, label, default | No | <video width="320" height="240" controls><source src="movie.mp4" type="video/mp4"><track src="subtitles_en.vtt" kind="subtitles" srclang="en" label="English"></video> |
tt | Defines teletype text | Text Content | Inline Text | None | Yes (HTML5). Use CSS instead. Deprecated to separate structure from presentation. | <tt>This is teletype text</tt> |
u | Defines text that should be stylistically different from normal text | Text Content | Inline Text | None | No | <p>This is some <u>mispeled</u> text.</p> |
ul | Defines an unordered list | Text Content | Lists | None | No | <ul><li>Coffee</li><li>Tea</li><li>Milk</li></ul> |
var | Defines a variable | Text Content | Inline Text | None | No | <p>The area of a triangle is: 1/2 x <var>b</var> x <var>h</var>, where <var>b</var> is the base, and <var>h</var> is the vertical height.</p> |
video | Defines a video or movie | Multimedia and Embedded Content | Audio and Video | src, width, height, controls, autoplay | No | <video width="320" height="240" controls><source src="movie.mp4" type="video/mp4"><source src="movie.ogg" type="video/ogg"></video> |
wbr | Defines a possible line-break | Text Content | Inline Text | None | No | <p>This is a very long word: supercali<wbr>fragilistic<wbr>expialidocious</p> |