Library tutorials & articles
Beginning HTML
Our First Page
Now that you have a basic understanding of how tags work, lets start designing our very first webpage. Open up Notepad and save the blank document as C:\My Webs\article\index.htm (or similar). All simple HTML web pages end with an htm suffix and if you want a page to show up as your first page, then usually you have to call it something similar to index.htm
NB: Although there are exceptions to this htm suffix, we need not worry about these now.
Every page must start with an <html> tag to tell the browser that what follows is HTML and we would like it to process it appropriately. Similarly, every page must end with an </html> tag to tell the browser that the HTML is finished. So, it makes sense that the first thing you should add to each new page is the <html></html> tag pair.
HTML can be divided into two distinct sections, the header and the body. The header of the document contains configuration information for the browser, as well as scripts and other such data. The body of the document is where the text that you want the user to see appears. For now, we'll concentrate on the body of the document.
To tell the browser that what follows is the body of the document, we must use the <body> tag. To tell it that we've finished with the body we must use the </body> tag.
Now that you understand these concepts we can make your first page using the following code:
<html>
<body>
Hello world!
</body>
</html>
Insert this code into your text editor and save the file. Try opening the index.htm in your browser now.
There you go - your first webpage. You should just see the text Hello World!
An interesting point about HTML is that "white-space" is ignored. This means that you can put as many spaces as you like between tags and the effect is the same.
For instance, the code:
<html><body>Hello world!</body></html>
Does exactly the same as above. I just prefer to space my tags out in this way, so that I can read the HTML more easily. I'm sure you'll develop a system that suits your needs after a little while.
Related articles
Related podcasts
-
Top Web Design Mistakes
Pete LePage is Product Manager of Internet Explorer Developer Division and he doesn’t want your web site to stink. Sharing from his talk given at TechEd 2008, Pete highlights 10 common web design mistakes and tells you how you can bypass the same blunders. Pete also tells us how future features o...
Events coming up
-
Dec
8
Web Design World
Boston, United States
Join your colleagues and top experts in the Web field as Web Design World returns to Boston December 8-10, 2008 for three dynamic days of information, interaction, insight and inspiration.
Hi
Nice read, I m noob in web design therefor it is so much useful for me in my study.
thanks
Hi All,
I have Registered in ur site, becs i want a Free HTML conerter software. if it is not available in ur Company then give the address where i down load it. i want to use it personally.
Regards
PKN
Hi all,
Sorry I've been away for so long. But I may be back soon. Does anybody really want a sequel? If so what do you want in it. Anything in particular? Post here or mail me and I'll include it, if it's not too hideously complicated.
I'm glad that some people have found this of some use.
Thanks for presenting "the beef", with none of the fat (or fluf) ...
Just what I needed! Thank you very much!
Anyone just starting out coding HTML should read this. Clearly and logically presented. 100%.
DotZip
This is awesome, please do a sequel because I really want to learn HTML. I usually use Dreamweaver or something but I want to stop being lazy!
Please do a sequal
This thread is for discussions of Beginning HTML.