Auto AdSense

Tuesday, 26 May 2015

Abbreviations and acronyms - HTML Programs

<html>
<body>

<p>The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.</p>
<p>Can I get this <abbr title="as soon as possible">ASAP</abbr>?</p>

<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>

Output



The WHO was founded in 1948.
Can I get this ASAP?
The title attribute is used to show the spelled-out version when holding the mouse pointer over the acronym or abbreviation.

Insert contact information - HTML Programs

<html>
<body>

<address>
Written by W3Schools.com<br>
<a href="mailto:us@example.org">Email us</a><br>
Address: Box 564, Disneyland<br>
Phone: +12 34 56 78
</address>

</body>
</html>

Output


Written by W3Schools.com
Email us
Address: Box 564, Disneyland
Phone: +12 34 56 78

Different computer-output tags - HTML Programs

<html>
<body>

<code>Computer code</code>
<br>
<kbd>Keyboard input</kbd>
<br>
<samp>Sample text</samp>
<br>
<var>Computer variable</var>
<br>

<p><b>Note:</b> These tags are often used to display computer/programming code.</p>

</body>
</html>

Output



Computer code
Keyboard input
Sample text
Computer variable
Note: These tags are often used to display computer/programming code.

Preformatted text (how to control line breaks and spaces) - HTML Programs

<html>
<body>

<pre>
This is
preformatted text.
It preserves      both spaces
and line breaks.
</pre>
The pre tag is good for displaying computer code:<br />


<pre>
for i = 1 to 10
     print i
next i
</pre>
</body>
</html>

Output


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

Text formatting - HTML Programs

<html>
<body>
<p><b>This text is bold</b></p>
<p><strong>This text is strong</strong></p>
<p><em>This text is emphasized</em></p>
<p><i>This text is italic</i></p>
<p><small>This text is small</small></p>
<p>This is<sub> subscript</sub> and <sup>superscript</sup></p>

</body>
</html>

Output

This text is bold
This text is strong
This text is emphasized
This text is italic
This text is small
This is subscript and superscript