Wednesday, July 19, 2017

HSC ICT (Chapter-04. Lecture-16)

32) VSPACE and HSPACE
To create a buffer zone of white space around the image VSPACE and HSPACE attributes is used. HSPACE is used to insert a buffer of horizontal space on the left and right of the image, whereas VSPACE attribute is used to insert a buffer of vertical space between the top and bottom of the image.
Example
<HTML>
<HEAD>
<TITLE> IMG with VSPACE AND HSPACE </TITLE>
</HEAD>
<BODY>
<IMG SRC =shahidminar.jpg VSPACE ="50" HSPACE ="50">
</BODY>
</HTML>

                                                    Figure : Images Vspace and Hspace
33) Border
To add a border around the image the BORDER=" “attribute is used. You can specify the thickness of the border in pixels.
Example
<HTML> <HEAD>
<TITLE> IMG with BORDER </TITLE>
</HEAD>
<BODY>
<IMG SRC =shahidminar.jpg BORDER ="10">
</BODY> </HTML>

                                                      Figure: image with Border
34) Alt Attribute
The alt attribute is an author-defined text and it provides alternative information for an image if a user for some reason cannot view it (because of slow connection, an error in the SRC attribute, or if the user uses a screen reader). In some browsers the description will also pop up when a mouse pointer is moved over the picture.
Example
<HTML>
<HEAD>
<TITLE> IMG with VSPACE
AND HSPACE </TITLE>
</HEAD>
<BODY>
<IMG SRC =shahidminar.jpg
BORDER ="10" ALT="any
alternative text">
</BODY>
</HTML>
                                                       Figure : Image with Border
<HTML>
<HEAD>
<TITLE> IMG with alter
</TITLE>
</HEAD>
<BODY>
<IMG SRC =shidnar.jpg
BORDER ="10" ALT="any
alternative text">
</BODY>
</HTML>

Share:

0 comments:

Post a Comment

Recent Posts

Unordered List

  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  • Aliquam tincidunt mauris eu risus.
  • Vestibulum auctor dapibus neque.

Pages

Theme Support

Need our help to upload or customize this blogger template? Contact me with details about the theme customization you need.