Weebly

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

Lesson 1: Tags

I Do Declare

Open a text editor of your choice and begin your HTML code with 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 start of every HTML file.

Opening and Closing Tags

HTML code is referred to as tags. Most tags have both an opening tag and a corresponding closing tag. After the declaration every HTML file begins with this opening tag:

<html>

Every HTML file ends with the corresponding closing tag:

</html>

Notice 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, one being the title tag:

<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 a web page is found between the opening and closing body tags:

<body> </body>

Example:

<html>

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

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

</html>

Notice that the closing html tag was added to the code. This means we are finished (at least for now), so save your code by giving the file a name and adding the .html like so: index.html

Important note:
The file name of your HTML code can be anything you want but you must name the homepage index.html or else your site's web address will not work.

Curious to see how the webpage looks? Click on the file to open it in your browser. To edit the code, open the file from your text editor, 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

html tutorial
This tutorial is available in printable PDF format

Get Your Copy

Get your website address at NameCheap