Adding Text
Adding and Formatting Texts
What We'll Be Building!
Each HTML tag has a specific purpose. Some are used for handling images, some for texts, some for making tables, etc. In this section we'll be taking a look at a few tags used specifically for outputting texts to the screen.
Heading Tags
Header tags are used when you'd like something to stand out on a page.
Lets take a look at some headings.
Heading tags are written as:
<h1>
<h2>
<h3>
<h4>
<h5>
<h6>
<h1>
defines the most important heading, while<h6>
defines the least important heading.
<!DOCTYPE html>
<html>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</body>
</html>
Paragraph Tag
A paragraph tag is used to hold any amount of text you'd like.
Heading tags are written as :
<p>
<!DOCTYPE html>
<html>
<body>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html>
Exercises
Create a new html document named texts.html. With this document and using the code above as a guide:
Create a paragraph tag and write:
"Hello there my name is <insert your here> " in it.
Last updated
Was this helpful?