ALL HTML TAGS

Most common tags

p a br div span h1 img svg ul li hr

Tags Description Syntax Example
paragraphs The <p> tag in HTML defines a paragraph. These have both opening and closing tags. <p> Content </p>
anchor The anchor tag in HTML is used to create a hyperlink on the webpage. This is an anchor
<a href="#">This is an anchor</a>
break The break tag inserts a single carriage return or breaks in the document. This element has no end tag. <br>
div The div tag is used in HTML to make divisions of content in the web page (text, images, header, footer, navigation bar, etc). <div>Content</div>
span The HTML span element is a generic inline container for inline elements and content. <span class="">text content of span</span>
heading An HTML heading tag is used to define the headings of a page. These 6 heading elements are h1, h2, h3, h4, h5, and h6; with h1 being the highest level and h6 being the least.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
image HTML Image, how to add the image in HTML. In earlier times, the web pages only contains textual content, which made them appear quite boring and uninteresting. <img src="url" alt="some_text" width="" height="">
svg HTML SVG Basics, & their implementation through the examples. SVG stands for Scalable Vector Graphics. <svg height="" width="">
list The list tag in HTML is used to define the list item in an HTML document. It is used within an Ordered List <ol> or Unordered List <ul>.
  1. List item 1
  2. List item 2
  3. List item 3
  • List item 1
  • List item 2
  • List item 3
hr The hr tag in HTML stands for horizontal rule and is used to insert a horizontal rule. <hr>

Text formatting

font b strong i em u blockquote ins del sup sub

font The font tag in HTML plays an important role in the web page to create an attractive and readable web page. <font attribute = “value"> Content </font>
bold The bold tag in HTML is used to specify the bold text without any extra importance. contents of the bold tag
strong The strong tag in HTML is the parsed tag and is used to show the importance of the text. Make that text bold. contents of the strong tag
italic This tag is generally used to display a technical term, phrase, the important word in a different language. text content of the i tag
phrase In HTML, phrase tag is used to indicate the structural meaning of a block of text. text content in the em tag
underline The underline tag in HTML stands for underline, and it's used to underline the text enclosed within the <u> tag. text content of u tag
blockquote The blockquote tag in HTML is used to display the long quotations (a section that is quoted from another source).
text content of blockquote tag
ins The ins tag is typically used to mark a range of text that has been added to the document. <ins> Contents… </ins>
delete Delete tag is used to mark a portion of text which has been deleted from the document. text content of del tag
sub and sup
  • The sub-tag is used to add a subscript text to the HTML document.
  • The <sup> tag is used to add superscript text to the HTML document.
Normal text superscript text
Normal text subscript text

HTML Structure

doctype html head title meta link body

!DOCTYPE html According to the HTML specification or standards, every HTML document requires a document type declaration. < !DOCTYPE html >
html The html tag in HTML is used to define the root of HTML and XHTML documents. <html> Contents </html>
head The head tag in HTML is used to define the head portion of the document which contains information related to the document. <head>…</head>
title The title tag in HTML is used to define the title of HTML document. It sets the title in the browser toolbar. <title> Title name </title>
meta The meta tag is regularly used to give watchwords, portrayals, author data, and other metadata that might be utilized by the program to deliver the document accurately or in simple words, it provides important information about a document. <meta attribute-name="value">
link The link tag is included in the head tag and defines the relationship between the current document and an external resource. Most often it is used to link to external style sheets or to add a favicon to html. The <link> element is an empty element as it contains attributes only. <link rel="stylesheet" href="styles.css">
body The body tag in HTML is used to define the main content present inside an HTML page. <body> Contents… </body>

Document Structure

nav main section article aside header footer

nav The nav tag is used for declaring the navigational section in HTML documents. Websites typically have sections dedicated to navigational links, which enables users to navigate the site. <nav> Links… </nav>
main The main tag is used to give the main information of a document. The content inside the <main> element should be unique for the document. <main>Contents</main>
section Section tag defines the section of documents such as chapters, headers, footers, or any other sections. <section> Section Contents </section>
article The <article> tag is one of the new sectioning element in HTML5. The tag is used to represent an article. <article>..</article>
aside The <aside> tag is used to describe the main object of the web page in a shorter way like a highlighter. <aside>..</aside>
header The header tag is used to contain the information related to the title and heading of the related content. <header> …</header>
footer The footer tag in HTML is used to define a footer of HTML document. This section contains the footer information. <footer> … </footer>

Table formatting

table thead tbody tfoot tr th td

table HTML Table, various ways to implement it, & will also understand its usage through the examples. HTML Table is an arrangement of data in rows and columns, or possibly in a more complex structure. <table>… </table>
thead This tag is used in HTML tables as head and body which are known as thead and tbody. <thead>Table head Contents…</thead>
tbody The tbody tag in HTML is used to make a group of the same type of content of the body element. <tbody> // Table contents </tbody>
tfoot This tag is used in HTML table with header and body which is known as “thead" and “tbody". <tfoot> // Table footer contents… </tfoot>
tr The table row tag is used to define a row in an HTML table. The <tr> element contains multiple <th> or <td> elements. <tr>…..</tr>
th The table header tag in HTML is used to set the header cell of a table. Two types of cells in the HTML table Header & Standard. <th> Contents… </th>
td The table data tag is used to define a standard cell in an HTML table. <td>……..</td>

Form elements

form button input select optgroup option textarea label progress meter

form This form is used basically for the registration process, logging into your profile on a website or creating your profile on a website, etc … <form> Form Content… </form>
button The button tag in HTML is used to define the clickable button. <button> tag is used to submit the content. <button type = “button">
input The input tag is used within < form> element to declare input controls that allow users to input data.




<input type = “value" …. />
select The select tag is used inside form element to create dropdown
<select name="" id=""></select>
optgroup This tag is used to create a group of the same category options in a drop-down list. <optgroup>…</optgroup>
option The option tag in HTML is used to choose an option from a Drop-Down menu. <option> Contents… </option>
textarea The textarea tag is used inside form element to create dropdown
<textarea name="" id="" ></textarea>
label The label tag in HTML is used to provide a usability improvement for mouse users. <label> form content… </label>
progress It is used to represent the progress of a task. It is also defined how much work is done and how much is left to download a thing. Loading...
75/100
meter It is used to define the scale for measurement in a well-defined range and also supports a fractional value. 5 out of 10 5 out of 20

Embedding content

iframe embed object audio video track

Iframes The iframe tag defines a rectangular region within the document in which the browser can display a separate document. <iframe src="URL" title="description"></iframe>
embed It is used as a container for embedding plug-ins such as flash animations. <embed attributes>
object The object tag is an HTML tag used to display multimedia like audio, videos, images, PDFs, and Flash on web pages. <object>…</object>
audio It is a useful tag if you want to add audio such as songs, interviews, etc. on your webpage.
<audio>..</audio>
video HTML5 Video, along with knowing the different ways to add the videos to the HTML page.
<video src="" controls> </video>
track The tracking tag specifies text tracks for media components audio and video. <track attribute>

Tags that relate to code

style script noscript pre code comment

style The style tag in HTML helps us to design the web page. <style>CSS rules </style>
<tagname style="property:value;">
script The script tag in HTML is used to define the client-side script. <script> Script Contents… </script>
noscript The noscript tag in HTML is used to display the text for those browsers which does not support the script tag or the browsers disable the script by the user. <noscript> Contents… </noscript>
pre The pre tag in HTML is used to define the block of preformatted text which preserves the text spaces.
console.log("My name is ", sasban)
var count = 1
i++ 
<pre> Contents… </pre>
code The code tag in HTML is used to define the piece of computer code. console.log("My name is ", sasban)
<code>Contents</code>
comment The comment tag is used to insert comments in the HTML code. <!- Here is a comment ->

Lesser used tags (A - Z)

Tags Description Syntax Example
abbreviation The abbreviation tag in HTML is used to define the abbreviation or short form of an element. <abbr title=" “> … </abbr>
acronym The acronym tag in HTML is used to define the acronym that gives useful information to browsers, translation systems, and search engines. <acronym title=" “> … </acronym>
address The address tag in HTML indicates the contact information of a person or an organization. <address> … </address>
applet The applet tag in HTML was used to embed Java applets into any HTML document, discontinued starting from HTML 5. <applet>….</applet>
area This area tag is used in an HTML document to map a portion of an image to make it clickable by the end-user. <area>
base The HTML base tag is used to specify a base URI, or URL, for relative links. This URL will be the base URL for every link on the page. <base href = " “>
basefont This tag is used to set the default text-color, font-size, & font-family of all the text in the browser. Not supported in HTML5. <basefont>
bdi The bdi tag refers to Bi-Directional Isolation. It differentiates a text from other text that may be formatted in a different direction. <bdi> … </bdi>
bdo The bdo stands for Bi-Directional Override. This tag is used to specify the text direction or used to change the current direction. <bdo dir> Contents… </bdo>
bgsound The bgsound tag is used to play the soundtrack in the background. <bgsound src="">
big The big tag in HTML is used to increase the selected text size by one larger than the surrounding text. In HTML 5. <big> Contents… </big>
caption The caption tag is used to specify the caption of a table. Only one caption can be specified for one table. <caption align = “value"></caption>
canvas It can be used to draw paths, boxes, texts, gradients, and add images. <canvas id = “script"> Contents</canvas>
center The center tag in HTML is used to set the alignment of text in the center. Not supported in HTML5. <center> Contents.</center>
cite The cite tag in HTML is used to define the title of a work. It displays the text in italic format. <cite>Content</cite>
colgroup It is useful for applying styles to entire columns, instead of repeating the styles for each column, and for each row <colgroup> Column lists </colgroup>
column The col tag in HTML is used to set the column properties for each column within a colgroup tag. <col attribute = “value">
data The data element gives an address to a given content with a machine-readable translator. <data value=""> Contents </data>
datalist The datalist tag is used to provide autocomplete feature & used with an input tag so that users can easily fill the data in the forms using select the data. <datalist>Contents</datalist>
dd The dd tag is used to denote the description or definition of an item in a description list. <dd>Contents</dd>
define The define tag in HTML represents the definition element and is used to represent a defining instance in HTML. <dfn>Contents</dfn>
details This tag is used to create an interactive widget that the user can open or close. <details>Contents</details>
dialog This tag is used to create a popup dialog and models on a web page. This tag is new in HTML5.


This tag is used to create a popup dialog and models on a web page.
This tag is new in HTML5.
dir The dir tag is used to make a list of directory titles. It is not supported in HTML 5 <ul> or CSS are used instead of <dir> tag. <dir> Lists… </dir>
dl The dl tag in HTML is used to represent the description list. In HTML4.1, it defines definition list and in HTML5, it defines description list. <dl> Contents… </dl>
dt The dt tag in HTML is used to specify the description list. It is used inside the <dl> element. It is usually followed by a <dd> tag. <dt> Content… </dt>
fieldset The fieldset tag in HTML5 is used to make a group of related elements in the form, and it creates the box over the elements. <fieldset>Contents</fieldset>
figcaption The figurecaption tag in HTML is used to set a caption to the figure element in a document. This tag is new in HTML5. <figcaption> Figure caption </figcaption>
figure The figure tag in HTML is used to add self-contained content like illustrations, diagrams, photos, or codes listed in a document. <figure> Image content… </figure>
frame HTML Frames are used to divide the web browser window into multiple sections. Not supported in HTML5. <frame/>
frameset The frameset element contains one or more frame elements. It is used to specify the number of rows and columns in a frameset with their pixel of spaces. <frameset cols = “pixels|%|*">
hgroup The hgroup tag in HTML is used to wrap one or more heading elements from <h1> to <h6>, such as the headings and sub-headings. <hgroup> … </hgroup>
isindex The index tag is used to query any document through a text field. <isindex prompt="search">
kbd The text enclosed within kbd tag is typically displayed in the browser’s default monospace font. text content of kbd tag
keygen The keygen tag in HTML is used to specify a key-pair generator field in a form. When a form is submitted then two keys are generated, the private key and a public key. <keygen name = “name">
legend The legend tag is used to define the title for the child contents. The legend elements are the parent element. <legend> Text </legend>
mark The mark tag in HTML is used to define the marked text. It is used to highlight the part of the text in a paragraph. <mark> Contents… </mark>
marquee The marquee tag in HTML is used to create scrolling text or images on a webpage. It scrolls either horizontally or vertically. The marquee tag in HTML is used to create scrolling text or images on a webpage. It scrolls either horizontally or vertically.
menuitem The menuitem tag is used to define a command or menu that the user can utilize from the popup item. Not supported in HTML5. <menuitem label="" icon="" type> </menuitem>
nobreak The no break tag is used to create a single line text, that does not matter how long the statement is, this tag is used with <wbr> tag. <nobr> Statement </nobr>
noembed The noembed tag is used to show that the browser does not support <embed> tag. <noembed> Element </noembed>
output The output tag in HTML is used to represent the result of a calculation performed by the client-side script such as JavaScript. <output> Results… </output>
param The param tag in HTML is used to define a parameter for plug-ins which is associated with <object> element. <param name="" value="">
q The q tag is a standard quotation tag and is used for short quotations. contents of the q tag
rp The rp tag in HTML is used to provide parentheses around a ruby main text which defines the information. <rp>[</rp> Explaination… <rp>]</rp>
rt The rt tag in HTML is used to define the explanation of the ruby annotation which is a small text, attached to the main text. <rt> Explanation… </rt>
ruby The ruby tag in HTML is used to specify the ruby annotation which is a small text, attached with the main text to specify the meaning of the main text. <ruby attributes> Contents… </ruby>
s This tag is used to specify that the text content is no longer correct or accurate. This tag is similar but slightly different from <del> tag. This text is deleted
samp It is a phrase tag used to define the sample output text from a computer program. <samp> Contents… </samp>
small The small tag in HTML is used to set small font sizes. It decreases the font size by one size (from medium to small, from x-large to large). contents of the small tag
source The source tag in HTML is used to attach multimedia files like audio, video, and pictures. <source src="" type=""> </source>
spacer The spacer tag is used to create some white space. Not-supported in HTML5 . <spacer type="" size="">
strike This tag creates a cut line in the text. This tag is depreciated from HTML 5. Now, the <del> tag is used instead of this tag. text content of strike tag
summary The <summary> tag in HTML is used to define a summary for the <details> element. <summary> Content </summary>
template The template tag in HTML is used to store the HTML code fragments, which can be cloned and inserted in an HTML document. <template> Contents </template>
time The time tag is used to display the human-readable date/time. It can also be used to encode dates and times in a machine-readable form. <time attribute> Time… </time>
tt The tt tag is the abbreviation of teletype text. This tag is depreciated from HTML 5. It was used for marking Keyboard input. <tt> Contents… </tt>
var It is a phrase tag used to specify the variable in a mathematical equation or in a computer program. <var> Contents… </var>
wbr The wbr tag is used to define the position within the text which is treated as a line break by the browser. <wbr>
xmp The XMP tag is used to create any content in letter format. <xmp> statement </xmp>