HTML Overview

Hypertext Markup Language (HTML) is the language that encodes World Wide Web documents. It is a document-markup and hyperlink-specification language that defines the syntax and placement of special, embedded directions that aren't displayed by a web browser but tell it how to display the contents of the document, including text, images, and other supported media. The language also tells you how to make a document interactive through special hypertext links, which connect your document with other documents on the network.

The syntax and semantics of HTML are defined in the HTML standard specification. The HTML specification and all other web-related standards issues are developed under the authority of the World Wide Web Consortium (W3C). Standards specifications and drafts of new proposals can be found at http://www.w3.org.

The latest HTML specification approved by the W3C is HTML 4.01.

Web Resources



 

 

 

 

 

 

 

 

 

The latest generation of browsers have implemented the new standard almost fully. Although some support is still buggy, very few features of the specification remain unsupported. In the past, some browser makers implemented nonstandard extensions that could only be used on limited platforms. These extensions have been mostly done away with, although some platform-specific support still exists.

HTML Document Structure

An HTML document consists of text, which comprises the content of the document, and tags, which define the structure and appearance of the document. The structure of an HTML document is simple, consisting of an outer <html> tag enclosing the document header and body:

<html>
<head>
<title>Barebones HTML Document</title>
</head>
<body>
<p>
This illustrates in a very <i>simple</i> way,
the basic structure of an HTML document.
</p>
</body>
</html>

Each document has a head and a body, delimited by the <head> and <body> tags. The head is where you give your HTML document a title and where you indicate other parameters the browser may use such as script and style sheets. The body is where you put the actual contents of the HTML document. This includes the text for display and document control markers (tags) that describe the text elements. Tags also reference media files like graphics and sound, and indicate the hot spots (hyperlinks or anchors) that link your document to other documents.

HTML Syntax

For the most part, HTML document elements are simple to understand and use. Every HTML element consists of a tag name, sometimes followed by an optional list of attributes, all placed between opening and closing brackets (< and >). The simplest elements are nothing more than the tag name enclosed in brackets, such as <head> and <i>. More complicated tags have attributes, which may have specific values defined by the author to modify the behavior of an element.

Attributes belong after the tag name, each separated by one or more tab, space, or return characters. The order of attributes in a single tag is not important. An attribute's value, if it has one, follows an equal sign after the attribute name. If an attribute's value is a single word or number, you may simply add it after the equal sign. All other values should be enclosed in single or double quotation marks, especially if they contain several words separated by spaces. The length of an attribute's value is limited to 1,024 characters. Here are some examples of tags with attributes:

<a href="http://www.ora.com/catalog.html" >

<h1 align="right">

<input name="filename" size="24" maxlength="80">

<link title="Table of Contents">

Tag and attribute names are not case-sensitive, but attribute values can be. For example, it is especially important to use the proper capitalization when referencing the URLs of other documents with the href attribute.

Most HTML elements consist of start and end tags that enclose a block of content. An end tag is the same as a start tag except it has a forward slash (/) before the tag name. End tags never contain attributes. For example, to italicize text, you enclose it within the <i> tags:

<i>This text in italics.</i>  

You should take care when nesting elements in a document. You must end nested elements by starting with the most recent one and working your way back out. In this example, a phrase in bold (<b>) appears in the text of a link (<a href=...>) contained in a paragraph:

<p>  This is some text in the body, with a  
<a href="another_doc.html">link, a portion of which  is <b>set in bold</b></a>  </p>

There are a handful of HTML elements that do not have end tags because they are standalone elements. For example, the image element (<img>) inserts a single graphic into a document and does not require an end tag. Other standalone elements include the line break (<br>), horizontal rule (<hr>), and others that provide information about a document that doesn't affect its displayed content such as <meta> and <base>.

XHTML

When the W3C defined the Extended Markup Language (XML), they also defined XHTML as a more rigorous, XML-compliant version of HTML. XHTML is designed to satisfy XML rules while still remaining legitimate HTML.

For example, although HTML specifies the <p> tag to start a paragraph, and the </p> tag to end it, you can easily omit the </p>, because HTML browsers will generally infer them. However, XHTML requires both <p> and </p> tags for all paragraphs, without exceptions.

The goal of the W3C is that eventually, HTML will migrate completely over to XHTML. However, that migration is likely to be slow. As long as people who write HTML documents manually can get away with omitting </p> tags and still have browsers parse them without complaint, they will continue to do so.

Most HTML authors today don't really need to worry about XHTML if all they're interested in is having their documents parsed by a web browser. But if you write tools that generate HTML, or if you expect that one day your document might be used in a venue other than the Web, you should take the time to learn XHTML. The differences between XHTML and HTML are trivial compared to the benefits of writing XML-compliant documents.

For more information on XHTML, refere to www.w3.org,

 



stats

Hosted by T35 Free Web Hosting. Indian Bridal Makeup - Casino Reviews - Drug Rehab - Online Degree - Cheap Domain - Prada Sneakers - SEO Services