Page 78 - TechPluse_C8_Flipbook
P. 78

<IMG> Tag: This tag embeds images into web pages, specifying the image source with the
                      src attribute.
                      <UL> and <OL> Tags: These tags are used for creating unordered and ordered lists. <UL>
                      creates a bulleted list, while <OL> creates a numbered list.
                      <LI> Tag: This tag defines a list item within <UL> or <OL> tags.

                      <TABLE> Tag: This tag defines a table structure, used with <TR> (table rows), <TD> (table
                      data), and <TH> (table header) tags.
                  We have also discussed HTML attributes, which are additional information about tags. Attributes
                  are specified within the opening tag and usually consist of a name and value, such as BGCOLOR
                  for background colour or WIDTH for setting width.
                  The websites we generally visit have lots of images as part of the 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, creating marquee,and linking web pages.
                      INSERTING IMAGES

                  Images and other graphical elements such as drawings, paintings and charts enhance the look
                  and feel of a web page. All these graphical elements are considered as image in the web page.
                  HTML also allows us to insert images inside the web pages through the <IMG> tag. The <IMG>
                  tag is an empty tag and has various attributes.
                  The attributes of the <IMG> tag are:

                      SRC: It specifies the source or URL of the image that has to be inserted in the web page. For
                      example,
                      <IMG SRC="lily.jpg">
                      WIDTH: It specifies the width of the image in the web page. For example,
                      <IMG SRC="lily.jpg" WIDTH="50%">
                      HEIGHT: It specifies the height of the image in the web page. For example,
                      <IMG SRC="lily.jpg" HEIGHT="60%">
                      ALIGN: It aligns the image with respect to the text placed adjacent to the image. Image can
                      be aligned left, right, middle, bottom and top. For example,
                      <IMG SRC="lily.jpg" ALIGN="right">
                      BORDER: It specifies the thickness of the border surrounding the image.
                      <IMG SRC="lily.jpg" BORDER="2">
                      ALT: It specifies the alternate text to be displayed in the web browser, if the provided image
                      is not found. For example,
                      <IMG SRC="lily.jpg" ALT="Describing the flower">
                  Let us use the <IMG> tag to insert an image on the web page in the following way:

                  <HTML>
                  <HEAD> <TITLE> Inserting Image </TITLE>
                  </HEAD>

                  <BODY>



               76       Premium Edition-VIII
   73   74   75   76   77   78   79   80   81   82   83