Thursday, October 6, 2011

Main Elements Of HTML

Untitled Document
In this second tutorial i am going to discuss about main elements of HTML document
Understanding the main elements of HTML will fetch you a lot in our future tutorials so pay attention on this tutorial
These elements are important during the validation of document.Lets go through the main elements of HTML document
  1. <!DOCTYPE>
  2. <html>
  3. <head>
  4. <meta>
  5. <title>
  6. <body>
<!DOCTYPE>
It Communicates with software(validators, browser) accessing the page to help identify the HTML rules being followed inside the document. It states and helps verify that all tags used within the document are syntactically correct to the document type defined.
<html>
Defines the beginning and end of the HTML document. It contains <head>,<meta>,<title> and <body> sections of the document
<head>
It is used to describe the content in the document. It contains two tags <meta> and <title>.
In this section we can also integrate external CSS and javscript.
<meta>
Used to describe the document with a description and keywords primarily. We can also communicate with search engine robots using many types of meta type content, and give specific instructions to the browser software currently accessing our pages.
<title>
Displays a page title in the browser tab bars and bookmark lists. The title element should come directly after your tags in the document and also communicates to search engine indexing bots to some degree.
<body>
As i have said about this in the first tutorial. Lets describe it again.Directly after the <head>  element closes(</head>) we define our element. This element contains everything that we want to display to the browser software. All the paragraph tags tables and all other content used to represent information goes under this tag.


The above are the main elements in a HTML document.

Analyze the below html code and try to execute it!!!



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta name="keywords" content="html, elements, web, page, structure, code"/>
<title>My Webpage</title>
</head>
<body>
<p>Hello World!</p>
</body>
</html>

Find the output and comment the result below

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews