HTML Lesson 1

Your first page

To view the code, rightclick on the page and choose 'View Source

NEXT > 

HELLO

 

Below is the code to produce a very simple, first HTML page that displays the word 'HELLO' and places a 'First Page' title in the title bar of the browser

<HTML>
<HEAD>
<!-- This is a comment in my first ever page - This is a general first page -->
<TITLE>Ninestein's Introduction to HTML - Lesson 01</TITLE>
</HEAD>
<BODY>
<H1>HELLO</H1>
</BODY>
</HTML>

Note that HTML is written with tags such as <BODY>. These tags determin how the text that follows them will behave. Note that most tags have an opening and a closing version. The closing version has a '/' in the tag.

An HTML page will always begin with a <HTML> tag and end with a </HTML>. Everything between those tags is considered HTML.

There are two major sections to an HTML page, <HEAD> and <BODY>. What goes into the <BODY> tag is the main content of the page that the user will see in the browser. What goes into the <HEAD> tag are things that dont affect the body, such as the title of the page to be displayed in the title bar of the browser. This is also where you are most likely to find javascript functions coded.

Create your first page by typing the blue text above into notepad, saving the script as firstone.html (remember to change the 'files of type' option to 'ALL Files') and then opening this html page in your browser.

Congratulations. You have just completed your first HTML page.