Page 47 - KEC Khaitan C7 Flipbook
P. 47

IMAGES, LINKS AND                                                                        CHAPTER


                 FORMS IN HTML5                                                                          A4

















                    Learning Outcomes                                                                           95%


                   The student will be able to:
                       insert and manipulate images in web pages.
                       use hyperlinks for navigation within and outside web pages.
                       embed audio and video.
                       design forms for user interaction.






                           IMAGES IN HTML


                 Images  enhance the look  of a web page  and make  it  attractive.  These are used  to  convey
                 information and catch 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” WIDTH=“500” HEIGHT=“600”>
                 ALT = “Alternate Text”




                                                                                   Images, Links and Forms in HTML5  45
   42   43   44   45   46   47   48   49   50   51   52