To write an html file, You can use the WYSWYG (What you see what you get) HTML editor, that are tool driven. But to be a successful web designer or developer, you should be able to write the code with hand and know how to use the tags. Good web developers are in the habit of writing the html file in the text editors, like notepad and save the file.
Now, what extension should you use to save the file .htm or .html. Initially, when there were windows 3.x series or with the older version of html editors, files were being saved generally with the extension as .htm as they allowed only three characters in the file extension, but with the higher versions or windows and text editors or on MAC machine the file can be saved as .html extension. Browsers allows for both suffixes. It acts upon .html and .htm in the same fashion.
Note : HTML is not a case sensitive language, whether you write the tags in lowercase or uppercase, the browser will treat them in the same fashion.
How to write a basic HTML Page Now, let's begin with a hand on experience of writing the html pages. Lets's write and understand the basic html page.
Open the notepad and start writing.
<TITLE>Title of page</TITLE>
Now save this file as test.html and close the notepad
Let's examine each html tag one by one
<HTML> </HTML> : The HTML tag tells a browser that this is an HTML page.
<HEAD> </HEAD> : The HEAD tag contains information about the page. The browser does not display the information contained in this tag to the user.
<TITLE> </TITLE> : The TITLE tag is contained in the HEAD tag and dispays the title of the HTML page. This is what we see on extreme left top of the browser.
<BODY> </BODY> : The BODY tag defines the documents' body. It contains all the contents (text and graphics) of the document that is displayed on the browser
Now open the file in the browser. Go to File-Open-browse and select the file to open.
So, your first html page is ready to rock....it wasn't that difficult ?? That's the beauty of this language, it is easy to learn and debug.
The HTML tags are not always simple , with some of the tags we have to pass the attributes. e.g if we want to insert an image, we need to provide the file name as the source for the browser to show the image.
Attribute values should always be enclosed in quotes. Double style quotes are the most common, but single style quotes are also allowed. In some rare situations, like when the attribute value itself contains quotes, it is necessary to use single quotes.
A post graduate in Computers from India, has a working experience of 5 years as an IT manager in a private bank in Internet related technologies.