Page 105 - ConceptGP_C7_Fb
P. 105

IMAGES IN HTML


                 Images enhance the look of a web page and make it attractive. These are used for conveying
                 information and catching the attention of website visitors. The most widely used image formats
                 supported by HTML are GIF, JPEG and PNG. The images on a web page can be inserted using the

                 <IMG> tag, which is an empty tag. It has the following attributes:



                      Attribute                    Value                           Description



                                         URL (or location) of the      SRC  stands  for source.  It  specifies  the
                  SRC
                                         image                         location of the image.

                                                                       ALT stands  for alternate  text.  It  specifies
                  ALT                    Text                          which alternative text should be displayed
                                                                       if selected image is not displayed.

                 Except for SRC attribute, all other attributes are optional in the <IMG> tag.

                 Syntax of <IMG> tag:

                 <IMG SRC=“URL of the image” ALT=“alternate text”
                 ALT = “Alternate Text”

                 ALIGN = “Alignment Type”
                 Write HTML code for inserting an image on a web page.

                 <!DOCTYPE HTML>
                 <HTML>

                 <HEAD>
                 <TITLE> Inserting Images </TITLE>
                 </HEAD>
                 <BODY>
                 <H1 ALIGN = "CENTER"> Valley of Flowers </H1>

                 <IMG SRC = "D:\Valley_of_Flower.jpg">
                 <P> Valley of Flowers National Park is an Indian nationa1 park, located
                 in North Chamoli and Pithoragarh, in the state of Uttarakhand and is
                 known for its meadows of endemic alpine flowers and the variety of
                 flora.
                 </P>
                 </BODY>

                 </HTML>






                                                                                   Images, Links and Forms in HTML5  103
   100   101   102   103   104   105   106   107   108   109   110