Learn HTML And Build Your Own Websites

0

HTML stands for Hyper Text Markup Language and has the extension .htm and .html. The HTML file is made up of markup tags which tells how the web page will look like on the browser (Mozilla Firefox, Netscape Navigator, Microsoft Internet Explorer, or Opera).

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> Test Page.

Now save this file as test .html and close the notepad

Let's examine each html tag one by one

<html> The HTML tag tells a browser that this is an HTML page.

<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 was not that difficult ?? That's the beauty of this language, it is easy to learn and debug.

But the HTML tags are not always simple, with some of the tags we have to pass the attributes. Eg if we want to insert an image, we need to provide the file name as the source for the browser to show the image.

<img src = img1.jpg>

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.

Click here for the complete list of HTML tags with examples

Leave A Reply

Your email address will not be published.