In Association with Amazon.in   Flipkart

Saturday, November 24, 2012

Different HTML Text Output Tags

<pre>: Preformatted text (how to control line breaks and spaces)
<html>
<body>
<pre>
This is
preformatted text.
It preserves      both spaces
and line breaks.
</pre>
<p>The pre tag is good for displaying computer code:</p>
<pre>
for i = 1 to 10
     print i
next i
</pre>
</body>
</html>
o/p>--------------------------------

This is
preformatted text.
It preserves      both spaces
and line breaks.
The pre tag is good for displaying computer code:
for i = 1 to 10
     print i
next i
Different computer-output tags:-
Line Breaks: <br/> tag.
Horizontal rule: <hr/>
Ex: <hr color="brown" width="50%" size="5" />
Attributes: align, width, size, color
o/p:--

Address Tag:
<html>
<body>
<address>
Millennium Software Solutions<br>
Dwarakanagar<br>
Vizag<br>
INDIA
</address>
</body>
</html>
o/p>--------------------------------------------

Millennium Software Solutions
Dwarakanagar
Vizag
INDIA

Text Formatting Tags

Tag Description
<b> Defines bold text
<big> Defines big text
<em> Defines emphasized text 
<i> Defines italic text
<small> Defines small text
<strong> Defines strong text
<sub> Defines subscripted text
<sup> Defines superscripted text
<ins> Defines inserted text
<del> Defines deleted text
<s> Deprecated. Use <del> instead
<strike> Deprecated. Use <del> instead
<u> Deprecated. Use styles instead

Citations, Quotations, and Definition Text Format Tags

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
The <q> tag is supported in all major browsers, except Internet Explorer.
<cite> Defines a citation
<dfn> Defines a definition term
Ex:
<html>
<body>
<abbr title="United Nations">UN</abbr>
<br />
<acronym title="World Wide Web">WWW</acronym>
<p>The title attribute is used to show the spelled-out version when holding the mouse pointer over the acronym or abbreviation.</p>
</body>
</html>
o/p>-----------------------------------------------------------------------------
UN
WWW
The title attribute is used to show the spelled-out version when holding the mouse pointer over the acronym or abbreviation
<bdo>  stand for bidirectional override.
The <bdo> tag allows you to specify the text direction and override the bidirectional algorithm.
<html>
<body>
<p>
If your browser supports bi-directional override (bdo), the next line will be written from the right to the left (rtl):
</p>
<bdo dir="rtl">
Here is some Hebrew text
</bdo>
</body>
</html>
o/p>-----------------------------------------------------------

If your browser supports bi-directional override (bdo), the next line will be written from the right to the left (rtl):
Here is some Hebrew text
<html>
<body>
<em>Emphasized text</em><br />
<strong>Strong text</strong><br />
<dfn>Definition term</dfn><br />
<code>Computer code text</code><br />
<samp>Sample computer code text</samp><br />
<kbd>Keyboard text</kbd><br />
<var>Variable</var><br />
<cite>Citation</cite>
</body>
</html>
O/P>-----------------------------------------------
Emphasized text
Strong text
Definition term
Computer code text
Sample computer code text
Keyboard text
Variable
Citation

No comments:

Post a Comment


Related Posts Plugin for WordPress, Blogger...