43
loading...
This website collects cookies to deliver better user experience
<h1>
which is the most important, to <h6>
which is the least important heading.Syntax:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<h1> This is a level 1 Heading Tag created using H1 Tag</h1>
<h1>Heading level 1</h1>
<h2>Heading level 2</h2>
<h3>Heading level 3</h3>
<h4>Heading level 4</h4>
<h5>Heading level 5</h5>
<h6>Heading level 6</h6>
</body>
</html>
Output:
<p>
tag defines a paragraph (some text)<p>
element.Syntax:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>
Output:
<a>
tag defines a hyperlink, which is used to link from one page to another.<a>
element is the href attribute, which indicates the link's destination.Syntax:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<a href="https://hashnode.com/">Visit Hashnode</a>
</body>
</html>
Output:
<ul>
tag. Each list item starts with the <li></li>
tag.Syntax:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
</body>
</html>
Output:
<ol>
tag. Each list item starts with the <li></li>
tag.Syntax
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
Output:
<img>
tag is used to add an image to an website.Syntax:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1592977386906/ovfhUTMtA.png?auto=compress" alt="Hashnode" width="300" height="300">
</body>
</html>
Output:
<input>
tag specifies an input field where the user can enter data and it's also the most important form element.Syntax:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<form action="/action_page.php">
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname"><br><br>
<input type="submit" value="Submit">
</body>
</html>
Output:
<div>
tag defines a division or a section in an HTML document.<div>
tag!Syntax:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<div>
<p>Hashnode is a free developer blogging platform that allows you to publish articles on your own domain</p>
<p>It helps you stay connected with a global developers across the world</p>
</div>
</body>
</html>
Output:
<label>
tag defines a label for several input elements.<label>
to work must be equal to the id attribute of the input.Syntax:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<form>
<!-- Starts label tags from here -->
<label for="student">
Student
</label>
<input type="radio" name="Occupation" id="student" value="student"><br>
<label for="business">Business</label>
<input type="radio" name="Occupation" id="business" value="business"><br>
<label for="other">Other</label>
<!-- Ends label tags here -->
<input type="radio" name="Occupation" id="other" value="other">
</form>
</body>
</html>
Output:
<span>
tag is an inline container used to mark up a part of a text, or a part of a document.<div>
element, but <div>
is a block-level element and <span>
is an inline element.Syntax:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<p><span>Hash Node</span></p>
</body>
</html>
Output: