[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
tagformat
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:
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:
If a tag contains no content, it should be closed as follows:
Keep in mind that mark-up tags should be used to provide information ''about'' the content; they should not be used themselves as content.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
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.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
