03 - DIY - Page Tags  DIY Web Page  Admin  10-Mar-2015 20:00  0  865 reads

Here I will detail the basic tags required on a web page. There are 6 main tags that must be present on a web page for it to function properly.

1. We need to let the browser know what sort of document the page is and this tag goes at the very top of your web page. The content of this tag is not displayed on your web page and is purely information for the browser.

It looks like this:

<!DOCTYPE html>

2. Next, we have to add the HTML tags. These tags go directly below the DOCTYPE tag. Notice, that there are two parts, the top tag and bottom tag. The top tag is the open tag and the bottom tag is the closing tag. Most tags from here on in are like this.

It looks like this:

<!DOCTYPE html>
<html>
</html>

3. Now, we need to add the Head tags. The Head tags go in between the HTML tags. The content of this tag is not displayed on your web page and is purely information for the browser.

It looks like this:

<!DOCTYPE html>
<html>
<head>
</head>
</html>

4. Next, we have to declare character encoding. This is only a single tag and it goes in between the head tags. The content of this tag is not displayed on your web page and is purely information for the browser.

It looks like this:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
</html>

5. Next up is the title tags. Once again open and closing tags and they go directly under the character encoding tag, and inside the head tags. While the HTML and head tags are placed top and bottom, the title tags are usually placed inline or side by side. The reason for this is so you can add your page title (My New Web Page). The title of your page can be any text to describe your web page. This text is not displayed on your web page but is displayed in the browser tab.

It looks like this:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My New Web Page</title>
</head>
</html>

6. Now, we need the body tags. These tags are aligned top and bottom and are placed directly under the closing head tag. Between these body tags is where you will place the main content of your web page. You will see that I have added the text "Hello and welcome to My New Web Page!" between the body tags. Any graphical content added between the body tags will output to the browser and display on the web page.

It looks like this:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My New Web Page</title>
</head>
<body>
Hello and welcome to My New Web Page!
</body>
</html>

CLICK HERE to see how "My New Web Page" looks.

I trust you found this article useful.


 
The comments are owned by the author. We aren't responsible for their content.
Author
Thread