So, we have learned about making a head and body in HTML, and now we need to actually print something onto our page.
Paragraph and Heading tags
The majority of your website content will be written in a <p> tag, or the paragraph tag. This is the tag to write basic sentences and form paragraphs. To make your site more readable and attractive, you will add <h1> or heading tags. Let’s take a look at the tags:
<p> This is a paragraph </p>
<h1> This is a heading </h1>
<h2> This is a smaller heading </h2>
<h3> This is an even smaller heading </h3>
There are actually 6 heading tags <h1> <h2> <h3> <h4> <h5> <h6> to select from, depending on the size of the heading you need.
I have written them in on jsbin.com and produced the following output:
When making a webpage, you will want to use a variety of headings and sections of text.
Exercise:
Write a program that prints a 2 paragraphs with two heading tags.
(Click here if you need a refresher on the basic structure of an html page.)