[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
TagFormat

Tag

With regards to certain  ?SGML-defined languages like HTML and XML, tags are information about the data being presented. This is to say, a document will have certain content, and the content will be marked-up with tags to provide not more content, but rather information ''about'' the content.

A tag may provide information about how the content is to be presented (as is most often the case with HTML) or about the role the content plays in the larger information structure (as is more often the case with XML).

Tags are typically enclosed in escape characters which let the interpreter know that the information contained within is not part of the content of the document. In the case of  ?SGML-defined languages, these escape characters are the less-than (<) and greater-than (>) symbols.

Thus, a tag might be:

<body>


Note that tags must be both opened and closed. There is generally an opening tag and a closing tag, with the content to which the tag applies contained within. ('''Note''': While it is true that HTML, for instance, contains many tags which do not require closing, this is actually a simplification, and new versions of HTML such as XHTML are moving away from this.) The closing tag is identical to the opening tag except that it uses the slash character (/) to indicate that it is closing. Thus, a title might be tagged as follows:

<title>My Document</title>


If a tag contains no content, it should be closed as follows:

<hr />


Keep in mind that mark-up tags should be used to provide information ''about'' the content; they should not be used themselves as content.

last edited (December 22, 2002) by IvanStojic, Number of views: 2150, Current Rev: 3 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.