Html Tags Table

Tag NameDescriptionCategorySub CategoryAttributesDeprecatedExample Usage
!--...--Defines a commentDocument StructureRootNoneNo<!-- This is a comment -->
!DOCTYPESpecifies the document typeDocument StructureRootNoneNo<!DOCTYPE html>
aDefines a hyperlinkText ContentInline Texthref, target, rel, downloadNo<a href="https://example.com">Link</a>
abbrDefines an abbreviation or acronymText ContentInline TexttitleNo<abbr title="World Health Organization">WHO</abbr>
acronymDefines an acronymText ContentInline TexttitleYes (HTML5). Use <abbr> instead. Deprecated to improve semantic markup.<acronym title="As Soon As Possible">ASAP</acronym>
addressDefines contact information for the author/owner of a documentText ContentBlock-level TextNoneNo<address>Written by <a href="mailto:webmaster@example.com">Jon Doe</a>.</address>
appletEmbeds a Java appletMultimedia and Embedded ContentEmbedded Contentcode, objectYes (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>
areaDefines an area inside an image mapMultimedia and Embedded ContentImages and Graphicsshape, coords, href, altNo<area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm">
articleDefines an independent, self-contained contentDocument StructureContent SectioningNoneNo<article><h1>Article Title</h1><p>Article content...</p></article>
asideDefines content aside from the page contentDocument StructureContent SectioningNoneNo<aside><h4>Sidebar</h4><p>Some sidebar content...</p></aside>
audioEmbeds sound content in documentsMultimedia and Embedded ContentAudio and Videosrc, controls, autoplay, loopNo<audio controls><source src="audio.mp3" type="audio/mpeg">Your browser does not support the audio element.</audio>
bSpecifies bold textText ContentInline TextNoneNo<b>This text is bold</b>
baseSpecifies the base URL/target for all relative URLs in a documentDocument StructureDocument Metadatahref, targetNo<base href="https://www.example.com/" target="_blank">
basefontSpecifies a default color, size, and font for all text in a documentText ContentInline Textcolor, face, sizeYes (HTML4, removed in HTML5). Use CSS instead. Deprecated to separate structure from presentation.<basefont color="red" size="3" face="Arial">
bdiIsolates a part of text that might be formatted in a different direction from other text outside itText ContentInline TextNoneNo<p>This text is in English, but the next word is <bdi>عربي</bdi> which is Arabic.</p>
bdoOverrides the current text directionText ContentInline TextdirNo<bdo dir="rtl">This text will go right-to-left</bdo>
bigDefines bigger textText ContentInline TextNoneYes (HTML5). Use CSS font-size instead. Deprecated to separate structure from presentation.<big>This text is bigger</big>
blockquoteDefines a section that is quoted from another sourceText ContentBlock-level TextciteNo<blockquote cite="http://www.example.com">Here is a long quotation...</blockquote>
bodyDefines the document's bodyDocument StructureContent SectioningNoneNo<body><h1>This is a heading</h1><p>This is a paragraph.</p></body>
brDefines a single line breakText ContentInline TextNoneNo<p>This is a paragraph<br>with a line break.</p>
buttonDefines a clickable buttonData RepresentationFormstype, name, value, disabledNo<button type="button">Click me!</button>
canvasUsed to draw graphics, on the fly, via scripting (usually JavaScript)Multimedia and Embedded ContentImages and Graphicswidth, heightNo<canvas id="myCanvas" width="200" height="100"></canvas>
captionDefines a table captionData RepresentationTablesNoneNo<table><caption>Monthly savings</caption><tr><th>Month</th><th>Savings</th></tr></table>
centerDefines centered textText ContentBlock-level TextNoneYes (HTML4, removed in HTML5). Use CSS text-align: center instead. Deprecated to separate structure from presentation.<center>This text is centered</center>
citeDefines the title of a workText ContentInline TextNoneNo<p><cite>The Scream</cite> by Edvard Munch. Painted in 1893.</p>
codeDefines a piece of computer codeText ContentInline TextNoneNo<code>var person = {firstName:"John", lastName:"Doe"};</code>
colSpecifies column properties for each column within a <colgroup> elementData RepresentationTablesspanNo<table><colgroup><col span="2" style="background-color:red"><col style="background-color:yellow"></colgroup></table>
colgroupSpecifies a group of one or more columns in a table for formattingData RepresentationTablesspanNo<table><colgroup><col span="2" style="background-color:red"><col style="background-color:yellow"></colgroup></table>
dataLinks the given content with a machine-readable translationText ContentInline TextvalueNo<data value="398">Mini Ketchup</data>
datalistSpecifies a list of pre-defined options for input controlsData RepresentationFormsNoneNo<input list="browsers"><datalist id="browsers"><option value="Chrome"><option value="Firefox"></datalist>
ddDefines a description/value of a term in a description listText ContentListsNoneNo<dl><dt>Coffee</dt><dd>Black hot drink</dd></dl>
delDefines text that has been deleted from a documentText ContentInline Textcite, datetimeNo<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
detailsDefines additional details that the user can view or hideInteractive ElementsopenNo<details><summary>Copyright 2021.</summary><p>All rights reserved.</p></details>
dfnSpecifies a term that is going to be defined within the contentText ContentInline TextNoneNo<p><dfn>HTML</dfn> is the standard markup language for creating web pages.</p>
dialogDefines a dialog box or windowInteractive ElementsopenNo<dialog open><p>Greetings, everyone!</p></dialog>
dirDefines a directory listText ContentListscompactYes (HTML5). Use <ul> instead. Deprecated due to lack of semantic meaning.<dir><li>html</li><li>xhtml</li><li>css</li></dir>
divDefines a section in a documentText ContentBlock-level TextNoneNo<div><h2>This is a heading in a div element</h2><p>This is some text in a div element.</p></div>
dlDefines a description listText ContentListsNoneNo<dl><dt>Coffee</dt><dd>Black hot drink</dd><dt>Milk</dt><dd>White cold drink</dd></dl>
dtDefines a term/name in a description listText ContentListsNoneNo<dl><dt>Coffee</dt><dd>Black hot drink</dd></dl>
emDefines emphasized textText ContentInline TextNoneNo<p>This is <em>emphasized</em> text.</p>
embedDefines a container for an external application or interactive contentMultimedia and Embedded ContentEmbedded Contentsrc, type, width, heightNo<embed src="helloworld.swf" type="application/x-shockwave-flash" width="300" height="200">
fieldsetGroups related elements in a formData RepresentationFormsdisabled, form, nameNo<fieldset><legend>Personalia:</legend><label>Name: <input type="text"></label></fieldset>
figcaptionDefines a caption for a <figure> elementMultimedia and Embedded ContentImages and GraphicsNoneNo<figure><img src="pic.jpg" alt="My Image"><figcaption>Fig.1 - My Image</figcaption></figure>
figureSpecifies self-contained contentMultimedia and Embedded ContentImages and GraphicsNoneNo<figure><img src="pic.jpg" alt="My Image"><figcaption>Fig.1 - My Image</figcaption></figure>
fontDefines font, color, and size for textText ContentInline Textcolor, face, sizeYes (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>
footerDefines a footer for a document or sectionDocument StructureContent SectioningNoneNo<footer><p>© 2021 My Company</p></footer>
formDefines an HTML form for user inputData RepresentationFormsaction, method, name, targetNo<form action="/submit-form" method="post"><input type="text" name="username"><input type="submit"></form>
frameDefines a window (a frame) in a framesetDocument StructureContent Sectioningsrc, name, frameborder, scrollingYes (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>
framesetDefines a set of framesDocument StructureContent Sectioningcols, rowsYes (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 h6Defines HTML headingsText ContentBlock-level TextNoneNo<h1>This is heading 1</h1><h2>This is heading 2</h2><h3>This is heading 3</h3>
headContains metadata/information for the documentDocument StructureDocument MetadataNoneNo<head><title>Page Title</title></head>
headerDefines a header for a document or sectionDocument StructureContent SectioningNoneNo<header><h1>Welcome to My Website</h1><p>A site about web development</p></header>
hgroupGroups heading elementsDocument StructureContent SectioningNoneYes (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>
hrDefines a thematic change in the contentText ContentBlock-level TextNoneNo<p>This is some text</p><hr><p>This is some other text</p>
htmlDefines the root of an HTML documentDocument StructureRootxmlns, langNo<html lang="en"><head><title>Page Title</title></head><body></body></html>
iDefines a part of text in an alternate voice or moodText ContentInline TextNoneNo<p>He thought, <i>This can't be real!</i></p>
iframeDefines an inline frameMultimedia and Embedded ContentEmbedded Contentsrc, width, height, name, sandboxNo<iframe src="https://www.example.com" width="500" height="300"></iframe>
imgDefines an imageMultimedia and Embedded ContentImages and Graphicssrc, alt, width, heightNo<img src="image.jpg" alt="Description of image" width="500" height="300">
inputDefines an input controlData RepresentationFormstype, name, value, required, placeholderNo<input type="text" name="username" placeholder="Enter username">
insDefines a text that has been inserted into a documentText ContentInline Textcite, datetimeNo<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
kbdDefines keyboard inputText ContentInline TextNoneNo<p>Press <kbd>Ctrl</kbd> + <kbd>C</kbd> to copy text.</p>
labelDefines a label for an <input> elementData RepresentationFormsforNo<label for="username">Username:</label><input type="text" id="username">
legendDefines a caption for a <fieldset> elementData RepresentationFormsNoneNo<fieldset><legend>Personal Information:</legend><input type="text" name="firstname"></fieldset>
liDefines a list itemText ContentListsvalueNo<ul><li>First item</li><li>Second item</li></ul>
linkDefines the relationship between a document and an external resourceDocument StructureDocument Metadatahref, rel, typeNo<link rel="stylesheet" href="styles.css">
mainSpecifies the main content of a documentDocument StructureContent SectioningNoneNo<main><h1>Most Important Content</h1><p>This is the main content of the webpage.</p></main>
mapDefines an image mapMultimedia and Embedded ContentImages and GraphicsnameNo<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>
markDefines marked/highlighted textText ContentInline TextNoneNo<p>Do not forget to <mark>buy milk</mark> today.</p>
menuDefines a list/menu of commandsInteractive ElementstypeNo<menu><li><button onclick="copy()">Copy</button></li><li><button onclick="cut()">Cut</button></li></menu>
metaDefines metadata about an HTML documentDocument StructureDocument Metadataname, content, charset, http-equivNo<meta charset="UTF-8"><meta name="description" content="Free Web tutorials">
meterDefines a scalar measurement within a known rangeData RepresentationFormsvalue, min, max, low, high, optimumNo<meter value="2" min="0" max="10">2 out of 10</meter>
navDefines navigation linksDocument StructureContent SectioningNoneNo<nav><a href="/html/">HTML</a> | <a href="/css/">CSS</a> | <a href="/js/">JavaScript</a></nav>
noframesDefines an alternate content for users that do not support framesDocument StructureContent SectioningNoneYes (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>
noscriptDefines an alternate content for users that do not support client-side scriptsScripting and StylingScriptingNoneNo<noscript>Your browser does not support JavaScript!</noscript>
objectDefines an embedded objectMultimedia and Embedded ContentEmbedded Contentdata, type, width, heightNo<object data="movie.mp4" width="400" height="300"></object>
olDefines an ordered listText ContentListsreversed, start, typeNo<ol><li>First item</li><li>Second item</li><li>Third item</li></ol>
optgroupDefines a group of related options in a drop-down listData RepresentationFormslabel, disabledNo<select><optgroup label="Swedish Cars"><option value="volvo">Volvo</option><option value="saab">Saab</option></optgroup></select>
optionDefines an option in a drop-down listData RepresentationFormsvalue, selected, disabledNo<select><option value="volvo">Volvo</option><option value="saab">Saab</option></select>
outputDefines the result of a calculationData RepresentationFormsfor, form, nameNo<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>
pDefines a paragraphText ContentBlock-level TextNoneNo<p>This is a paragraph.</p>
paramDefines a parameter for an objectMultimedia and Embedded ContentEmbedded Contentname, valueNo<object data="movie.swf"><param name="autoplay" value="true"></object>
pictureDefines a container for multiple image resourcesMultimedia and Embedded ContentImages and GraphicsNoneNo<picture><source media="(min-width:650px)" srcset="img_pink_flowers.jpg"><img src="img_white_flower.jpg" alt="Flowers"></picture>
preDefines preformatted textText ContentBlock-level TextNoneNo<pre>Text in a pre element is displayed in a fixed-width font, and preserves both spaces and line breaks</pre>
progressRepresents the progress of a taskData RepresentationFormsvalue, maxNo<progress value="22" max="100"></progress>
qDefines a short quotationText ContentInline TextciteNo<p>WWF's goal is to: <q>Build a future where people live in harmony with nature.</q></p>
rpDefines what to show in browsers that do not support ruby annotationsText ContentInline TextNoneNo<ruby>漢 <rp>(</rp><rt>ㄏㄢˋ</rt><rp>)</rp></ruby>
rtDefines an explanation/pronunciation of characters (for East Asian typography)Text ContentInline TextNoneNo<ruby>漢 <rt>ㄏㄢˋ</rt></ruby>
rubyDefines a ruby annotation (for East Asian typography)Text ContentInline TextNoneNo<ruby>漢 <rt>ㄏㄢˋ</rt></ruby>
sDefines text that is no longer correctText ContentInline TextNoneNo<p><s>My car is blue.</s> My new car is silver.</p>
sampDefines sample output from a computer programText ContentInline TextNoneNo<p>Message from my computer:</p><p><samp>File not found.<br>Press F1 to continue</samp></p>
scriptDefines a client-side scriptScripting and StylingScriptingsrc, type, async, deferNo<script src="script.js"></script>
searchDefines a search sectionDocument StructureContent SectioningNoneNo<search><form><input type="search"><button>Search</button></form></search>
sectionDefines a section in a documentDocument StructureContent SectioningNoneNo<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>
selectDefines a drop-down listData RepresentationFormsname, multiple, sizeNo<select name="cars"><option value="volvo">Volvo</option><option value="saab">Saab</option><option value="fiat">Fiat</option></select>
smallDefines smaller textText ContentInline TextNoneNo<p>This is some normal text. <small>This is some smaller text.</small></p>
sourceDefines multiple media resources for media elements (<video> and <audio>)Multimedia and Embedded ContentAudio and Videosrc, type, mediaNo<video width="320" height="240" controls><source src="movie.mp4" type="video/mp4"><source src="movie.ogg" type="video/ogg"></video>
spanDefines a section in a documentText ContentInline TextNoneNo<p>My mother has <span style="color:blue">blue</span> eyes.</p>
strikeDefines strikethrough textText ContentInline TextNoneYes (HTML5). Use <s> or <del> instead. Deprecated to improve semantic markup.<p><strike>This text is strikethrough.</strike></p>
strongDefines important textText ContentInline TextNoneNo<strong>This text is important!</strong>
styleDefines style information for a documentScripting and StylingStylingtype, mediaNo<style>body {background-color: powderblue;}</style>
subDefines subscripted textText ContentInline TextNoneNo<p>H<sub>2</sub>O is the chemical formula for water.</p>
summaryDefines a visible heading for a <details> elementInteractive ElementsNoneNo<details><summary>Copyright 2021</summary><p>All rights reserved.</p></details>
supDefines superscripted textText ContentInline TextNoneNo<p>The 4<sup>th</sup> of July is American Independence Day.</p>
svgDefines a container for SVG graphicsMultimedia and Embedded ContentImages and Graphicswidth, heightNo<svg width="100" height="100"><circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" /></svg>
tableDefines a tableData RepresentationTablesborderNo<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>
tbodyGroups the body content in a tableData RepresentationTablesNoneNo<table><thead><tr><th>Month</th><th>Savings</th></tr></thead><tbody><tr><td>January</td><td>$100</td></tr></tbody></table>
tdDefines a cell in a tableData RepresentationTablescolspan, rowspanNo<table><tr><td>Cell 1</td><td>Cell 2</td></tr></table>
templateDefines a templateWeb ComponentsNoneNo<template><h2>Flower</h2><img src="img_white_flower.jpg"></template>
textareaDefines a multiline input control (text area)Data RepresentationFormsname, rows, colsNo<textarea name="message" rows="10" cols="30">The cat was playing in the garden.</textarea>
tfootGroups the footer content in a tableData RepresentationTablesNoneNo<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>
thDefines a header cell in a tableData RepresentationTablescolspan, rowspan, scopeNo<table><tr><th>Month</th><th>Savings</th></tr><tr><td>January</td><td>$100</td></tr></table>
theadGroups the header content in a tableData RepresentationTablesNoneNo<table><thead><tr><th>Month</th><th>Savings</th></tr></thead><tbody><tr><td>January</td><td>$100</td></tr></tbody></table>
timeDefines a date/timeText ContentInline TextdatetimeNo<p>We open at <time>10:00</time> every morning.</p>
titleDefines a title for the documentDocument StructureDocument MetadataNoneNo<title>HTML Reference</title>
trDefines a row in a tableData RepresentationTablesNoneNo<table><tr><td>Cell 1</td><td>Cell 2</td></tr></table>
trackDefines text tracks for media elements (<video> and <audio>)Multimedia and Embedded ContentAudio and Videosrc, kind, srclang, label, defaultNo<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>
ttDefines teletype textText ContentInline TextNoneYes (HTML5). Use CSS instead. Deprecated to separate structure from presentation.<tt>This is teletype text</tt>
uDefines text that should be stylistically different from normal textText ContentInline TextNoneNo<p>This is some <u>mispeled</u> text.</p>
ulDefines an unordered listText ContentListsNoneNo<ul><li>Coffee</li><li>Tea</li><li>Milk</li></ul>
varDefines a variableText ContentInline TextNoneNo<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>
videoDefines a video or movieMultimedia and Embedded ContentAudio and Videosrc, width, height, controls, autoplayNo<video width="320" height="240" controls><source src="movie.mp4" type="video/mp4"><source src="movie.ogg" type="video/ogg"></video>
wbrDefines a possible line-breakText ContentInline TextNoneNo<p>This is a very long word: supercali<wbr>fragilistic<wbr>expialidocious</p>