Chapter 4 – HTML – II: Images, Links, and Tables
Sumita Arora Book Solution
Que 11. Write the HTML to make the ‘elephant.jpg’ image appear on the right side of the page, with a big headline reading “Elephant of the World Unit!” on the left side of the page next to it.
Answer: The HTML code is: <IMG src = “Elephant.jpg” align = “right”>
<!DOCTYPE html>
<html>
<head>
<title>Image Alignment</title>
</head>
<body>
<h1 align = "center">Image Alignment</h1>
<B> Elephant of the World Unit! </B>
<img src="Elephant.jpg" align = "right" >
</body>
</html>
Que 12. How would you insert an image file named elephant.jpg at the very top of a Web page?
Answer: To insert the image at the very top of a Web page, the align attribute of <IMG>
tag should be set to “top” in the following way:
<IMG SRC = "ELEPHANT.JPG" ALIGN = "TOP">
Que 13. Suppose you have a large picture of a standing elephant named elephant.jpg . Now make a small named fly.jpg appear to the left of the elephant’s head and mouse.jpg appear next to the elephant’s right foot.
Answer: The HTML code to perform the given task is as follows:
<IMG SRC = "FLY.JPG" ALIGN = "TOP">
<IMG SRC = "ELEPHANT.JPG">
<IMG SRC = "MOUSE.JPG" ALIGN = "BOTTOM">
Que 14. Your home page will be at http://www.mysite.com/home.htm when you put it on the Internet. Write the HTML code to go on that page so that when someone clicks the words “All About Me” , they see the page located at http://www.mysite.com/mylife.htm .
Answer: The HTML code to perform the given task is as follows:
<A href = “http://www.mysite.com/mylife.htm”> All About Me </A>
Que 15. You plan to publish a CD-ROM disk containing HTML pages. How do you create a link from a page in the \guide folder to the \guide\mains\kolkata.htm page?
Answer: The HTML code to perform the given task is as follows:
<A href = “mains\kolkata.htm”> Kolkata </A>
Que 16. Name the following with respect to HTML:
- – Element to create a hyperlink.
Answer: <A> anchor tag. <A href=”www.mycstutorial.in”> My CS Tutorial </A>
Que 17. What is a table? Which tag is used to create tables in HTML?
Answer: A table is the representation of arranged data (text, preformatted text, images, links, forms, form fields, other tables, etc,) into rows and columns of cells.
Tables are useful for the general display of tabular data.
In HTML, <TABLE> … </TABLE> tag is used to create tables.
Que 18. Which attributes are used to give border to a table?
Answer: The attributes which are used to give border to a table are:
- BORDER — This attribute tells the table how large the border should be.
- BORDERCOLOR — This attribute is used to specify the color of a table’s border.
- FRAME — This attribute is used with the border attribute and it allows the user to state which portions of the border will be displayed by the browser.
- RULES — It is used with border attribute and it allows the user to state which portions of the inside border edges will be displayed.
Que 19. Which attribute lets you control the display of select border sides of a table?
Answer: FRAME attribute – is used to define or select the border sides of a table. It is always used with BORDER attribute.
Que 20. Which attribute is used to control the inside table border?
Answer: RULES attribute – is used to control the inside table border. It is always used with BORDER attribute.