Wednesday, August 14, 2013

Introduction to HTML

Introduction to HTML

  •   HTML stands for Hyper Text Markup Language
  • HTML is used for developing static web pages
  •   HTML files have an extension of either .htm or .html
  • A HTML file consists of many markup tags. Tags inform the browser as to how text, images, tables, etc should be displayed.
  • HTML is not case sensitive
  • HTML standards are developed by W3C (World Wide Web Consortium) [www.w3.org]. The latest version of HTML is HTML 5 which was published in January 2008.


HTML tags



HTML tags are enclosed within angled brackets (“<>”). The general form of a HTML tag is:

<opening tag> some text </closing tag>

Here the opening tag takes the form of : <opening tag> and the closing tag is of the form: </closing tag>. The difference between the opening and the closing tag is the closing tag contains a forward slash (“</>”). Most of the HTML tags have both an opening and a closing tag. There are only a few tags that don’t have both (opening and closing) tags (which will be discussed latter). As a good practice every opening tag should have a corresponding closing tag, even though browsers are cable of rendering documents where certain closing tags are missing. There are many tags associated with HTML. 

Structure of a HTML document


The basic structure of a HTML document is:
<html>

<head>
<title></title>
.
.
.
</head>

<body>
.
.
.
</body>
</html>


A HTML document should start a with a <html> tag. So when the browser sees the opening <html> tag it identifies a HTML document. The last tag of the document should be a closing </html> tag which indicates the ending of a HTML document.

A HTML document can mainly be divided into two sections. i.e: the head section and the body section. Material displayed (tag, text, etc) between <head> and </head> comes under the head section. Material appearing in this section is not displayed in the browser page. Material in this section provides information about the document. The main tag in the head section is <title></title>. Any text appearing between <title> and </title> is displayed on the title bar of the browser window.

Contend appearing in the body section is displayed in the browser page. Most of the tags defined in HTML come under the body section.

Some times it s confused between tags and elements. This can be explained by an example.
Tags refer to the opening and closing tag. Element refers to the tags and the element content taken together.


Let's start our First web page.

This is a very simple html document. First open your Notepad and enter the bellow lines.





Now we should save the file So Follow bellow steps to save.
File => Save as  

File should save with adding .html or .htm to the end of the file name. Eg: first.html

Give “All Files” as Save as Type.

Then open Your browser and open your saved file (first.html). The output should be like this

Content between <title>and </title> of the head section is displayed in the title bar of the browser. In the body section there is only one element, which is <p> My First Web Page </p>. Content of this element is displayed in the browser page.



 

No comments:

Post a Comment

I know how time is important to you, But your comment will help us to develop this site....