Let’s get our hands dirty and begin writing a simple HTML web page.
First, start by opening Notepad. And now that we are ready to type, let's add our first HTML tags to our file.
• Type < H T M L >
• Hit "Enter", five times. This gives us some space to add the following tags
• and then type < / H T M L >
The HTML tag is the very first tag that you will make in every new web page. The opening HTML tag tells the web browser to start looking for more markup tags in the following text, and the closing - HTML tag tells the browser that there is no more HTML in the file, and that the page is all finished.
The HTML tag is not the only tag that every web page must have, there are two more we need to add before a browser can view our web page. The first one we need to add is called the 'Head' tag.
• We are going to add this tag between the HTML tags we just created
• Between your HTML tags, type < H E A D >
• Hit "Enter" twice
• and then type < / H E A D >
The head tag will not contain any HTML that will be displayed on our web page. Instead, the HTML inside of the Head tag is used to reference other files that help control how the browser will display our page, and also to set any special options that the browser supports.
For now we do not need to worry about putting any HTML inside of the head except for the Title tag.
• Bellow the head tag, type < T I T L E >
• Then next to the title tag, type MY FIRST WEB PAGE
• and then type < / T I T L E >
The text that we put inside of the title tags will show in the title bar of the web browsers. When I say title bar, I mean the blue bar at the very top of your browser window.
So now that we have a head and a title for our file, lets add the other required tag needed to finish our web page, which is called the 'Body' tag
• Underneath your the HEAD end tag and the HTML end tag, type < B O D Y >
• Hit "Enter" five times
• and type < / B O D Y >
The body tag is where we will put our entire HTML that we want the browser to show on the screen when it loads our page.
To finish our web page, let's add some text inside of the body so that we have something to see when we open our page in a web browser.
• Between your BODY tags, type HELLO WORLD
And now our HTML file is finished, and ready to be displayed in a browser. All that's left to do is save the file to disk.
One thing to remember when you save your file is that you will need to give it an extension of .HTM or .HTML
If you don't give your file a dot HTM or dot HTML extension, that's still okay, but when you browse to the directory where you saved the file and double click on it, it will probably open in note pad and not your web browser.
So now our file is saved to disk. At this moment our file is a completely finished web page, and we could upload it to an Internet web server so that anyone on the internet could view our web page.
Congratulations, you have just created your first web page.
Note: In order to publish this post, we added spaces between each character in our HTML tag examples. When typing your actual html tags, be sure there are no spaces bewteen the characters.
Thursday, May 8, 2008
Your First Web Page
Subscribe to:
Post Comments (Atom)


0 comments:
Post a Comment