Weebly

Create your website the fast and easy way without learning any code

Lesson 1: Tags

What Are Tags?

Tags are what HTML code is called, and there are lots of them. But before we get to them, open the empty HTML file you made in the introduction and write this bit of code:

<!DOCTYPE html>

That's what's called a "declaration". It doesn't do anything to your webpage but the folks who set the rules for HTML want it at the top of every HTML file.

Opening and Closing Tags

Most tags have an opening tag and a corresponding closing tag. Below the declaration every HTML file starts with this opening tag:

<html>

Every HTML file ends with the corresponding closing tag:

</html>

Take note of the / in the closing tag. All closing tags must have this slash. You know why? Because it's a closing tag, that's why.

Below the opening html tag come the opening and closing head tags:

<head> </head>

The head tag doesn't affect what appears on the web page, it's job is to hold certain other types of tags such as the title tag:

<!DOCTYPE html>

<html>

<head>
<title>My First Webpage</title>
</head>

The text between the title tags will appear in the browser's title bar:

Everything that is seen on webpages is found between the opening and closing body tags:

<body> </body>

Example:

<!DOCTYPE html>

<html>

<head>
<title>My First Webpage</title>
</head>

<body>
Look Ma, I'm Making my first webpage
</body>

</html>

That includes other tags as well, such as the strong tag which makes bold text:

<body>
Look Ma, I'm <strong>Making</strong> my first webpage
</body>

Any text between the opening and closing strong tags will be bold.

Wanna see how your webpage looks? Go to where you saved the file and click on it so it opens in your browser. To edit the code, open the file from your text editor, if you don't see it be sure that "All Files" is selected from the editor's dialog box.

The next lesson will introduce you to more tags and what they do. So let's move on to lesson 2

 

DID YOU KNOW...?
You can register a website address (called a domain in tech talk) even before you have a website. In fact the longer you wait the more difficult it will be to get one that isn't already taken. More Info

DID YOU KNOW...?
There is more to building a website than just making it. It also needs web hosting so that it can be seen on the internet. More Info

Get your website address at NameCheap