Tuesday, February 2, 2010

HTML Tutorial : Tags


In This tutorial, we will learn about HTM Tags. As we known, HTML is containt about Tags, Format, Table, List, Hyperlink, Image, Frame, etc. We have learn how to write html tags, so we can write article easily.



HTML stands for (H)yper(T)ext (M)arkup (L)anguage. It has certain tags and attributes defined, and is geared towards document display over the World Wide Web. HTML documents can be viewed in browsers such as Internet Explorer, Mozilla, Opera, and Safari. On this page, we will introduce the notion of tags and attributes. 

Tags
Tags are elements of the HTML document used to specify how the document should be displayed by the browser. In HTML, each tag has its own specific meaning, which is (in general) common across all different browsers. In fact, you may think of this tutorial as an introduction to the tags that are commonly used in writing HTML

Attributes
Attributes are associated with each tag to further define the tags. The general syntax is as follows: <tag attribute 1 = "value" attribute 2 = "value" ... >

A couple of other notes before we dive into the tutorial: 
- HTML tag codes are case-insensitive. 
- Many browsers will ignore badly-formed HTML documents. In other words, it is often okay to have a tag without the corresponding closing tag. 


The basic tags include <html>, <title>, <meta>, and <body>. We introduce each of the four in the following:

<html>
This tag is used to indicate that this is a HTML document. Most HTML documents should start and end with this tag.

<head>
This tag is used to indicate the header section of the HTML document, which typically includes the <title> and <meta> tags, and is not displayed in the main window of the browser.

<title>
This indicates the title of this HTML page. The title is what is displayed on the upper left corner of your browser when you view a web page. For example, right now you can see "Basic Tags: html, head, title, meta, body" there. That is the title of this page.
The title tag is important when it comes to search engine ranking. Many of the search engines pay special attention to the text in the <title> tag. This is because (logically) that words in the <title> tag indicate what the page content is.

<meta>
The <meta> tag information is not directly displayed when the page is rendered on the browser. Rather, this is used for the author of the HTML page to record information related to this page. Two common attributes are name and content. The <meta> tag used to hold great importance in search engine optimization, with authors carefully drafting what's inside the tag to gain better search engine ranking, but recently its importance has been decreasing steadily.

<body>
The <body> tag includes the HTML body of the document. Everything inside the <body> tag (other than those within the <script> tag) is displayed on the browser inside the main browser window.
The <body> tag may contain several attributes. The most commonly used ones are listed below:

  • bgcolor: This is the background color of the entire HTML document, and may be specified either by the color name directly or by the six-digit hex code.
  • alink: The color of the links.
  • vlink: The color of the visited links.
  • topmargin: The margin from the top of the browser window.
  • leftmargin: The margin from the left of the browser window.

So, in general, all HTML documents have the following format:

<html>
<head>
<title>
Here is the title of the HTML document.
</title>
<meta name=" " content=" " />
... (there may be one or more meta tags)
</meta>
</head>
<body>
Here is the body of the HTML document.
</body>
</html>

This is get from 1keydata.com
Note this for other tutorial

0 comments:

Post a Comment