Introduction to HTML

t;/H1>
</BODY>
</HTML>

We put <BODY> to tell the browser that this is the starting point of the body of our document. <H1> refers to header 1, which is the biggest text size (see below.) You can try from <H1> to <H6>. Different numbers will yield different sizes.

Here is an example:

 

h1

h3

h5

 

Now let's get back to our document. It now looks like this in a browser.

HELLO

Let's save this web page and view it in your browser. Save the page using 'save as' and name it whatever you like. Let's name it "mypage.htm" Please remember the location of your file. You may create a new directory for it or just simply save it in drive C. Open your web browser (Netscape or Internet Explorer) and try to open the file that you just save. Click on 'File' -> 'Open' and type in c:\mypage.htm or the path to your file.

You should see a big "Hello" in your browser.

Now, we'll add a sentence and align it.

<HTML>
<HEAD>
<TITLE>My first page</TITLE>
</HEAD>
<BODY>

<H1 ALIGN="CENTER">HELLO</H1>
<P ALIGN="LEFT">This text is aligned "left"
<P ALIGN="RIGHT">This text is aligned "right"

</BODY>
</HTML>

<P> refers to paragraph. You don't need the closing tag for <P>, but some people put the closing tag as a reminder. <P> is the way to tell the browser to begin a new line. We have put the word ALIGN after <P>. It's what called an attribute, an optional indicator. Some attributes need quotation marks, but some don't. An easy rule to remember is to put the quotation marks in every attribute.

Here is how our page looks now:

HELLO

This text is aligned "left"

This text is aligned "right"

©2008 WOWhostingCatalog.com. All Right Reserved. Privacy