Note: HTML code is written in Courier Font.
First of all, you need an html editor to write html code. You can use simple text editor or one of these free to use programs.For Windows:
- HTML-Kit: HTML-Kit is a full-featured editor designed to help HTML, XHTML and XML authors to edit, format, lookup help, validate, preview and publish web pages. Despite its name and the light download size, HTML-Kit is a multi-purpose tool that has support for several scripting and programming languages.
- Smultron: Smultron is a free text editor for Mac OS X Leopard 10.5 which is both easy to use and powerful. It is designed to neither confuse newcomers nor disappoint advanced users. It should work perfectly for a whole variety of needs - like web programming, script editing, making a to do list and so on.
Structure of HTML page
Now lets start with the structure of HTML page. Its consists of:
First look at the output then I shall explain it.
Every HTML page consists of three tags, <html>, <head> and <body>.
HTML page starts with <html> tag and ends with </html> tag. Everything goes in between <html> and </html> tags.
Then comes <head> tag. <head> tag may consist of many other tags. For example <title>, to put title of the web site. As you can see that in out example that the title of web site is 'A Simple Page'. Whatever we put in <title> tag, it will appear at the top on browser. Different browsers may have different place for titles. There are many other tags which go under <head>. I shall explain them later.
Everything displayed on the browser's white page goes under <body> tag. Which may include, simple text, graphics, tables, forms, movies etc. I sued two tags under <body>, <p> and <h1>. <p> is for paragraph and <h1> is for heading. I shall explain these in further detail in lesson 1.
Now you know the basic structure of HTML page. You can try this by making a simple page following the structure. Just write anything which you like in the title and under body. Save it with extension html and open in any web browser. Opening an html file is same like opening any other file like doc, xl, of gif file. Go to File then Open File. Browse through the file which you just created and open it.
Thats it for the structure of HTML page. You may now go to Lesson 1.