Page 64 - Chinmaya_C7_flipbook
P. 64

We generally have lots of images as a part of a web page. We also notice that all the web pages are
                  interlinked with each other. Sometimes, we see that a web page is divided into various sections.
                  HTML allows us to implement all these functionalities in our web pages. In this chapter, we will
                  learn about inserting images, linking web pages, and creating frames.



                              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.


                   62   Premium Edition-VII
   59   60   61   62   63   64   65   66   67   68   69