In our previous lesson we have learned how to create a HTML document using Notepad++. Today we will go a little further. We will learn the basic parts of a web-page i.e.: head, title, body and paragraph.
Make the head
Everything in our HTML file will go between the opening and closing tags.
There are always two parts to the file: the head and body. Let’s focus on the head.
a. It has an opening and a closing tag.
b. The head includes important information about the webpage, such as its title.
c. The title is the words we see in the tab (for example, the title of this page is “Introduction to HTML”).
Do it Yourself
1.Add a opening and closing tag.
2.Between the tags, add in opening tags.
3.In between the title tags write the title of your webpage.
This is how your code will look like:
Paragraphs in the body
We have set up a lot of the basic things for your HTML file for you.
We have learned about opening and closing tags. When we put content between the tags, the entire bit is called an element.
Notice we have both title tags now, but we need body tags. The content in the body is what will be visible on the actual page. The body goes inside the html tags, but not inside the head tags, like this:
Do it Yourself
- Between the title tags, give your page a name. It can be anything!
- Underneath the closing head tag, put in the opening and closing body tags.
- Inside the body, create two paragraphs! Each paragraph requires opening and closing tags
Your final code will look like the following:
<title>Name of Your Webpage</title>
<body> <!–opening of body tag–>
</body> <!–closing of body tag–>