My Profile

Friday, January 21, 2011

Computer Output Tags




<PRE> ... </PRE>   Tag

The Preformatted Text element presents blocks of text in fixed-width font, and so is suitable for text that has been formatted on screen.

WIDTH attribute

The <PRE> element may be used with the optional WIDTH attribute, which is a Level 1 feature. The WIDTH attribute specifies the maximum number of characters for a line and allows the HTML user agent to select a suitable font and indentation. If the WIDTH attribute is not present, a width of 80 characters is assumed. Where the WIDTH attribute is supported, widths of 40, 80 and 132 characters should be presented optimally, with other widths being rounded up.

Within preformatted text:

  • Line breaks within the text are rendered as a move to the beginning of the next line.

  • The <P> element should not be used. If found, it should be rendered as a move to the beginning of the next line.

  • Anchor elements and character highlighting elements may be used.

  • Elements that define paragraph formatting (headings, address, etc.) must not be used.

  • The horizontal tab character (encoded in US-ASCII and ISO-8859-1 as decimal 9) must be interpreted as the smallest positive nonzero number of spaces which will leave the number of characters so far on the line as a multiple of 8. Its use is not recommended however.

Example :-

<PRE WIDTH="80">
This is an example line.
</PRE>






<CODE> ... </CODE>   Tag

The Code element indicates an example of code; typically rendered as monospaced . Do not confuse with the Preformatted Text element.

Example :-
This sentence contains an <CODE>example of code</CODE>.


<KBD> ... </KBD>   Tag

The Keyboard element indicates text typed by a user; typically rendered as monospaced . It might commonly be used in an instruction manual.

Example :-
The text inside the <KBD>KBD element, would typically</KBD> render as monospaced font.


<SAMP> ... </SAMP>   Tag

The Sample element indicates a sequence of literal characters; typically rendered as monospaced.

Example :-
A sequence of <SAMP>literal characters</SAMP> commonly renders as monospaced font.


<TT> ... </TT>   Tag

The Teletype element specifies that the text should be rendered in fixed-width typewriter font.

Example :-
Text between the <TT> typetype elements</TT> should be rendered in fixed width typewriter font.


<LISTING> ... </LISTING>  Tag

The <LISTING> element can be used to present blocks of text in fixed-width font, and so is suitable for text that has been formatted on screen.  As such, it is similar to the <PRE>  and <XMP> elements, but has a different syntax.

                                                                                                    Typically, it will render

as fixed width font with white space separating it from other text.  It should be rendered such that 132 characters fit on the line. NOTE : Only Netscape actually complies with this

Example :-
Some might say<LISTING>that sunshine</LISTING> follows thunder


<PLAINTEXT>   Tag

The <PLAINTEXT> element can be used to represent formatted text.  As such, it is similar to the <XMP> and <LISTING> element.  However, the <PLAINTEXT> element should be an open element, with no closing element.  Only Netscape supports this element according to any HTML specification.  Internet Explorer and Mosaic will both allow the use of a </PLAINTEXT> closing element.  Netscape will treat the closing element as straight text.

Typically, it will render as fixed width font with white space separating it from other text.

Example :-
We live<PLAINTEXT>as we breathe alone


<XMP> ... </XMP>   Tag

The <XMP> element can be used to presents blocks of text in fixed-width font, and so is suitable for text that has been formatted on screen.  As such, it is similar to the <PRE> and <LISTING> elements, but has a different syntax.

                                                                                                    Typically, it will render as fixed width font with white space separating it from other text.  It should be rendered such that 80 characters fit on the line.

Example :-
The <XMP>Netscape Navigator</XMP> doesn't support coloured tables.







Citations, Quotations, and Definition Tags


<ADDRESS> ... </ADDRESS>   Tag

The Address element specifies such information as address, signature and authorship, often at the top or bottom of a document.

Typically, an Address is rendered in an italic typeface and may be indented.  It carries an implied paragraph break before and after the text enclosed.

Example :-
<ADDRESS>
Mr. Cosmic Kumquat<BR>
SSL Trusters Inc.<BR>
1234 Squeamish Ossifrage Road<BR>
Anywhere<BR>
NY 12345<BR>
U.S.A.
</ADDRESS>


<BLOCKQUOTE> ... </BLOCKQUOTE>   Tag

The BLOCKQUOTE element is used to contain text quoted from another source.

A typical rendering would be a slight extra left and right indent, and/or italic font. The BLOCKQUOTE element causes a paragraph break, and typically provides space above and below the quote.

Example :-
I think the poem ends
<BLOCKQUOTE>
<P>Soft you now, the fair Ophelia. Nymph,  in thy orisons, be all my sins remembered.
</BLOCKQUOTE>
but I am not sure.

<CITE> ... </CITE> Tag

The Citation element specifies a citation; typically rendered as italics.

Example :-
This sentence, containing a <CITE>citation reference</CITE>



<DFN> ... </DFN>  Tag

The <DFN> element can be used to mark the Defining Instance of a term.  For example, the first time some text is mentioned in a paragraph. Typically, it will render italicised.

Example :-
The <DFN>Internet Explorer</DFN> is Microsoft's Web browser.




Points to remember


Tag
Description
<code>
Defines computer code text
<kbd>
Defines keyboard text 
<samp>
Defines sample computer code
<tt>
Defines teletype text
<var>
Defines a variable
<pre>
Defines preformatted text
<listing>
Deprecated. Use <pre> instead
<plaintext>
Deprecated. Use <pre> instead
<xmp>
Deprecated. Use <pre> instead

Tag
Description
<abbr>
Defines an abbreviation
<acronym>
Defines an acronym
<address>
Defines an address element
<bdo>
Defines the text direction
<blockquote>
Defines a long quotation
<q>
Defines a short quotation
<cite>
Defines a citation
<dfn>
Defines a definition term
----------------------------------------------------------

** If you like this post please like our page in facebook

0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More