0% found this document useful (0 votes)
4 views2 pages

HTML Tag

The document provides a comprehensive overview of HTML tags, detailing their purposes and providing examples for each tag. It includes essential tags such as <!DOCTYPE>, <html>, <head>, <title>, <body>, and various formatting and list tags. This serves as a reference for students learning to create a website using HTML.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

HTML Tag

The document provides a comprehensive overview of HTML tags, detailing their purposes and providing examples for each tag. It includes essential tags such as <!DOCTYPE>, <html>, <head>, <title>, <body>, and various formatting and list tags. This serves as a reference for students learning to create a website using HTML.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

HTML Tag Purpose / What It Is Used For Example

<!DOCTYPE Tells the browser the document is


<!DOCTYPE html>
html> HTML5
<html> Root element of the HTML page <html> ... </html>
Contains information about the page (not
<head> <head> ... </head>
visible)
<title> Sets the title shown on the browser tab <title>My Web Page</title>
<body> Contains all visible content on the page <body> ... </body>
<h1> – <h6> Headings (largest to smallest) <h1>Main Heading</h1>
<p> Defines a paragraph <p>This is a paragraph.</p>
<br> Inserts a line break Line 1<br>Line 2
<b> Makes text bold <b>Bold Text</b>
<i> Makes text italic <i>Italic Text</i>
<u> Underlines text <u>Underlined Text</u>
<ul> Creates an unordered (bulleted) list <ul>...</ul>
<ol> Creates an ordered (numbered) list <ol>...</ol>
<li> Defines a list item <li>Item</li>
<a
<a> Creates a hyperlink href="[Link]
<img> Displays an image <img src="[Link]">
<hr> Inserts a horizontal line <hr>
<div> Groups content together <div>...</div>
<span> Styles or groups inline content <span>Text</span>
<meta> Provides page metadata <meta charset="UTF-8">

Html Tags for Creating a website

HTML Tag Purpose Sample Code (Students Can Use)


<!DOCTYPE
html>
Declares the document as HTML5 <!DOCTYPE html>
<html> Root element of the web page <html> ... </html>
<head> Holds page information (not <head> <title>My Page</title> </head>
HTML Tag Purpose Sample Code (Students Can Use)
displayed)
<title> Displays page title in browser tab <title>My First Website</title>
<body> Contains visible webpage content <body> Welcome to my website </body>
<h1> Main heading <h1>Welcome</h1>
<h2> Sub-heading <h2>About Me</h2>
<p> Paragraph text <p>This is my first web page.</p>
<br> Line break Hello<br>World
<b> Bold text <b>Important</b>
<i> Italic text <i>Italic text</i>
<u> Underlined text <u>Underlined</u>
<ul> Bulleted list <ul><li>Apple</li><li>Banana</li></ul>
<ol> Numbered list <ol><li>Step 1</li><li>Step 2</li></ol>
<li> List item <li>List Item</li>
<a
<a> Hyperlink href="[Link]
<img> Displays an image <img src="[Link]" alt="My Image">
<hr> Horizontal line <hr>
<div> Groups content <div>This is a section</div>
<span> Inline grouping <span>Highlighted text</span>
<meta> Character encoding <meta charset="UTF-8">

You might also like