HTML for beginners
Lesson 1
The Very Basics

The html language uses what we call "tags". Tags serve different purposes. Each one will be explained as we come to it. All tags are placed between the < and > characters.

We will start with the tags that "EVERY" html page must have....
well, almost every page. Here is the basic code required to make an html page followed by what each tag does.

<html>
<head>
<title></title>
</head>
<body>

</body>
</html>

You will notice the tags are in pairs, one without, and one with the /. The / is called a closing tag to tell the browser that we are finished with the function of that tag. Nearly all tags used require closing tags. There is a new coding language on the market that we call xml and xhtml which has much stricter requirements including closing tags for EVERY opening tag, but until you finish these lessons, don't even think about it.

Tag Meaning
html This is the first thing your browser sees and it tells your browser that it is getting an html page. That's how your browser knows how to handle everything that follows.
head This is where different types of information are stored that are not seen on your browser, but are used for various purposes like search engine tags, general data, and some javascript codes. Your "title" tags are also inside the "head" tags.
title This is the title of your web page. This is what shows at the top of the screen, and what is usually shown when the page is bookmarked. When your pages are added to a search engine, this is frequently what people will see when the search engine gives the link to your site. It should say what the page is about, but be fairly brief.
body This is what everybody sees in their browser. Everything between the opening and closing "body" tags is used to display your page. This is where we will be adding new stuff in the next lesson.

Html browsers don't care if you type your tags in UPPERCASE, lowercase, or BotH, but the new language REQUIRES lower case, so it's best to start right now with the habit of always using lower case tags.

Copy the above code into notepad and save it as "index.html", then go to wherever you saved it and launch it by double-clicking or single-clicking, depending how your system is set up. You will see a blank page. Don't worry, it worked. We just don't have anything in the body of our page yet. We called it index.html because with most websites, this is the name of the first page we see. It's usually what is called the "default" page. That means if someone typed www.awebsite.com without following it with a page name, they will usually see the index.html page.

Save this file for future use because throughout the lessons we will be constantly adding to it to teach you newer tags.

If you highlighted the text above and used copy and paste to put it in notepad, you will probably find that every line after the first is indented. That's because I'm using a table here so the text doesn't go right to the edge of the screen. Some browsers will cause indenting and some won't. Don't worry about it. You can remove the indents or leave them. Either way works. Later on we will start worrying about layout, and then you will want to remove the indents.

Let's add some body


 Quick links            
 

Premier Website Solutions
Hosting, Design, and Domain Registration

Hosting   Design   Registration

General Help   Contact   Client FAQ's

Home Page

Read client testimonies.

Tell a friend about this site.

About Us

email This website is designed and hosted by Premier Website Solutions