Title - Heading – Paragraph
How to run HTML
Step 1: Open the Notepad
Step 2: Copy and Paste the below code
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Stpe 3: Save the file. For example man.html
Step 4: open the man.html
Step 5: Now you will see the answer on your screen
Example : Header and Paragraph without Title
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Example : Header and Paragraph with Title
<!DOCTYPE html>
<html>
<head>
<title>Welcome Page</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Example : Heading 1 to 6
<!DOCTYPE html>
<html>
<body>
<h1>This is heading 1</h1>
<h1 style="font-size:60px;">Heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>
Example : Paragraph
The browser will automatically remove any extra spaces and lines when the page is displayed:
<!DOCTYPE html>
<html>
<body>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<p>
This paragraph
contains a lot of lines
in the source code,
but the browser
ignores it.
</p>
<p>
This paragraph
contains a lot of spaces
in the source code,
but the browser
ignores it.
</p>
</body>
</html>