Auto AdSense

Tuesday, 17 November 2015

Aligning images - HTML Programs

<html>
<body>

<h4>Image with default alignment (align="bottom"):</h4>
<p>This is some text. <img src="smiley.gif" alt="Smiley face" width="32" height="32"> This is some text.</p>

<h4>Image with align="middle":</h4>
<p>This is some text. <img src="smiley.gif" alt="Smiley face" align="middle" width="32" height="32"> This is some text.</p>

<h4>Image with align="top":</h4>
<p>This is some text. <img src="smiley.gif" alt="Smiley face" align="top" width="32" height="32"> This is some text.</p>

<p><b>Note:</b> The align attribute is deprecated in HTML 4, and is not supported in HTML5. Use CSS instead.</p>

</body>
</html>

Output



Image with default alignment (align="bottom"):

This is some text. Smiley face This is some text.

Image with align="middle":

This is some text. Smiley face This is some text.

Image with align="top":

This is some text. Smiley face This is some text.
Note: The align attribute is deprecated in HTML 4, and is not supported in HTML5. Use CSS instead.

Note: Due to inclusion of code to blogpost, images not able to display. But the code will work properly

Insert images - HTML Programs

<html>
<body>
<p>
An image:
<img src="html/home.png" alt="home" width="32" height="32"></p>

<p>
A moving image:
<img src="smiley.gif" alt="you are the best" width="48" height="48"></p>

<p>
Note that the syntax of inserting a moving image is no different from a non-moving image.
</p>

</body>
</html>

Output


An image: home
A moving image: you are the best
Note that the syntax of inserting a moving image is no different from a non-moving image.

Note: Due to inclusion of code to blogpost, images not able to display. But the code will work properly

Wednesday, 3 June 2015

Insert horizontal lines - HTML Programs

<html>
<body>
<p>The hr tag defines a horizontal rule:</p>
<hr><p>This is a paragraph</p>
<hr><p>This is a paragraph</p>
<hr><p>This is a paragraph</p>
</body>
</html>

Output


The hr tag defines a horizontal rule:

This is a paragraph

This is a paragraph

This is a paragraph

How to mark deleted and inserted text - HTML Programs

<html>
<body>

<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>

<p>Notice that browsers will strikethrough deleted text and underline inserted text.</p>

</body>
</html>

Output

My favorite color is blue red!
Notice that browsers will strikethrough deleted text and underline inserted text.

Text direction - HTML Programs

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

Output



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