Wednesday 6 April 2011

*HTML

What is HTML ?
HTML, which stands for 'Hyper Text Markup Language', is the predominant markup language for web pages. HTML is the basic building blocks of webpages.HTML is written in the form of HTML elements consisting of 'tags', enclosed in angle brackets (like <html>), within the web page content. HTML tags normally come in pairs like <h1> and </h1>. The first tag in a pair is the 'start tag', the second tag is the 'end tag' (they are also called 'opening tags' and closing' tags'). In between these tags programmers can add text, tables, images, etc.

HTML is a computer language devised to allow website creation. These websites can then be viewed by anyone else connected to the Internet. It is relatively easy to learn, with the basics being accessible to most people in one sitting; and quite powerful in what it allows you to create.

How does it work ?
HTML consists of a series of short codes typed into a text-file by the site author - these are the tags. The text is then saved as a html file, and viewed through a browser, like 'Internet Explorer' or 'Netscape Navigator' etc. This browser reads the file and translates the text into a visible form, hopefully rendering the page as the author had intended. Writing your own HTML entails using tags correctly to create your vision. You can use anything from a rudimentary text-editor to a powerful graphical editor to create HTML pages.

HTML is considered as a universal language to design web pages. It is machine independent, which means it can be used on all type of computer and can be read by all browsers. HTML involves no programing. It is a way of organizing the layout of a web page and defining the hyperlinks so that it can be displayed by a browser.

History of HTML
HTML was invented in 1999 by Tim Berners Lee, a scientist at CERN, Switzerland, at the European Laboratory for Particle Physics . The purpose was to make it easier for scientists of different universities to gain access to each other's research. Tim laid down the foundation of the World Wide Web.

Elements in HTML
A  HTML document is made op of text, headings, paragraphs, tables, horizontal lines, lists, etc. These are known as the elements of a HTML document.

Tags and Attributes
A HTML page also has elements called Tags and Attributes which are marks that are embedded in the text. These elements define the appearance of the page and decide how the page will appear in the browser. Browser are able to understand the formating specification given by the Tags and Attributes.

Tags in a HTML page
A tag consist of a left angle brackets (<) and a right angle brackets (>). The specification given to the browser are written within the brackets. There are two type of tags - Container tags and Empty tags.


1. Container tag
 Container tags are used  in  pairs and have a starting and ending tag. These tags define how the matter contained within them should be  formatted.  for example to make a line of  text bold we use the tags <b>.......</b>
      Tags are not case sensitive. so <b>........</b> is the same as <B>.......</B> but the correct way is to type them in lowercase.

2. Empty tags
Empty tags have only a tarting tag. Empty tags give formatting consisting construct like line breaks <br>, horizontal rule <hr>. etc.

Structure of a HTML document
The basic structure of any HTML document is

<html> 
   <head>
       <title> This is the title of the page </title>
   </head>
    <body>
This is where the contents of the page are to be written.
    </body>
</html>
Let us study the elements of a HTML document in detail.

How to Create a HTML document


Creating and Saving a HTML File
 To create a HTML document we need to open a text editor like Notepad or Wordpad.




  1. Click on Start  -->  Programs  -->  Accessories  -->  Notepad.
  2. Open a new page and type out the html code.
  3. Click File  -->  Save. In the Save dialog box save the file in the desired location with a name having an extension .htm or .html .



saving a HTML File

Viewing the HTML File
HTML pages can be viewed in a browser software. Here we shall use Internet Explorer.

  1. Click on the Internet Explorer icon
  2. In the address bar type the name of the HTML document giving the complete path i.e. where it is located. 
Viewing a HTML File

or

             Click the arrow key of the address bar to locate the file.

or

  1. Click File  -->  Open. The Open dialog box appears.
  2. Click the browser window to view the Microsoft Internet Explorer Window.
  3. Locate the file and click Open.
  4. In the Open window click OK.

No comments:

Post a Comment