HTML Tags
No. Tag Explanation
1 <!DOCTYPE html> Declares the document type and version of HTML (HTML5). It helps the browser understand
how to render the HTML code.
2 <html> The root element of the HTML document. All other elements are nested inside it.
3 <head> Contains metadata about the document such as title, links to stylesheets, and scripts. Not
displayed on the page.
4 <title> Sets the title of the HTML page which appears in the browser tab. It goes inside the <head>.
5 <body> Holds all the content that is displayed on the web page like text, images, links, etc.
6 <h1> to <h6> Heading tags. <h1> is the largest and most important, <h6> is the smallest. Used for page titles
and section headings.
7 <p> Defines a paragraph. It separates blocks of text into readable sections.
8 <a> The anchor tag. It creates hyperlinks to other web pages or resources. The href attribute
defines the link's destination.
9 <img> Embeds an image in the page. Uses src for the image source and alt for alternative text. It's a
self-closing tag.
10 <ul>, <ol>, <li> Used for lists. <ul> is for unordered (bulleted) lists, <ol> is for ordered (numbered) lists, and <li>
is for list items.
11 <div> A block-level container used to group elements together for styling or scripting.
12 <span> An inline container used to apply styles or scripts to a small portion of text.
13 <br> Inserts a line break. It's a self-closing tag that breaks the text to the next line.
14 <hr> Draws a horizontal line across the page, often used to separate content.
15 <strong> Displays important text in bold. Also conveys semantic meaning to screen readers.
16 <em> Emphasises text, typically displayed in italics. Also used to stress content semantically.
17 <form>, <label>, These are form elements. <form> creates the form container, <label> provides a name for input
<input> fields, and <input> allows users to enter data like text, numbers, etc.