Paragraphs and headings are the main textual elements of the body of your webpages. Because these contain content that you want to organize and display on your webpage, these are entered in the body element.
The <h1>
, <h2>
, <h3>
, etc tags denote headings and subheadings, <h1>
being the largest.
THe <p>
tags denote paragraphs, or blocks of text.
<!DOCTYPE html>
<html lang="en">
<head>
<title>A boring story</title>
</head>
<body>
<h1>
Cleaning my boiler
</h1>
<p>
When I got to my basement that day, I knew that I just had to clean my boiler. It was just too dirty. Honestly, it was getting to be a hazard. So I got my wire brush and put on my most durable pair of boiler-cleaning overalls. It was going to be a long day.
</p>
</body>
</html>
Note that the <title>
is in the <head>
element, which is where information about the webpage goes.
In you index.html
file, add
- Title
- Heading
- Paragraph
What do you notice about how the information is organized in the webpage? In other words, where is the title, heading and paragraph text?