Professional Documents
Culture Documents
2) This attribute of the <img> tag is used to specify the URL/path of the image.
i. Alt ii. border
iii. SRC iv. width
3) While creating a table, the __________ tag is used to add a title to the table.
i. <td> ii. <caption>
iii. <th> iv. <table>
4) Which attribute of the <td > tag is used to create merged cells across columns?
i. align ii. rowspan
iii. colspan iv. align
6) The cell spacing attribute specifies an extra space between the ________________.
i. cell and content ii. adjacent cells
iii. adjacent tables iv. none of these
8) This attribute of the image tag is used to specify an alternate text if the image cannot be displayed.
i. Src ii. align
iii. Alt iv. none of these
9) In HTML, you can create a hyperlink using
i. Text ii. image
iii. both a. and b. iv. none of these
10) You can create a drop-down list in an HTML form by using the _________ element.
i. Input ii. select
iii. both a. and b. iv. none of these
12) This attribute of the table tag specifies extra space around the contents of a cell.
i. ALIGN ii. WIDTH
iii. CELLSPACING iv. CELLPADDING
13) ____________ _ is an interactive page which resembles a paper document containing textboxes,
option button, drop-down list, checkboxes and so on.
i. Form ii. Hyperlink
Iii. Image iv. Table
14) Links to a part or section of the same document are called ___________ links.
i. Lists ii. Internal Link
iii. External Links iv. Named Links
15) ___________ are text or pictures, which when clicked, open another web page or image or another
file linked to it.
i.Forms ii. Hyperlinks
iii. Images iv. Tables
16) The __________ attribute is used to merge two or more cells across the rows.
i. align ii. rowspan
iii. colspan iv. align
1. Write HTML code to insert an image with the following attributes in a web page.
URL of the image - angel.png
Alternate Text - Angel
Width of the image - 25
height of the image - 35
width of the border = 4
Ans: <html>
<body>
<img src="angel.png" alt="Angel" width="25" height="35" border=”4”>
</body>
</html>
Ans: <html>
<head>
<title>HTML table Tag</title>
</head>
<body>
<table border="1">
<tr>
<th>Teams</th>
<th>Ranking</th>
</tr>
<tr>
<td>India</td>
<td align = center>1</td>
</tr>
<tr>
<td>New Zealand</td>
<td align = center>2</td>
</tr>
<tr>
<td>Australia</td>
<td align = center>3</td>
</tr>
</table>
</body>
</html>
4. Name the different types of images that are used in web pages. Which image type is most suitable
for photographs? Why?
Ans: TIFF, GIF, JPEG, PNG. JPEG is most suitable for photographs as it can display a wide spectrum of
colors while still keeping the file size small.
i. Internal links are links to a part or i. External links are links to another file.
section of the same document.
ii. The attribute ‘NAME’ is required for ii. Only ‘HREF’ attribute is required to
naming the linked section and ‘HREF’ for specify the filename to be linked.
specifying the section to be linked.
6. What are the elements that you can add in a HTML form?
Ans: Text fields, checkboxes, radio button, submit button and reset button.
7. Use an HTML tag to convert the image in the given code into a link.
When clicked, it should open the website www.gmail.com
Write the HTML code for the same <img src = “flower.jpg” alt=”flower” height=50 width=50>
Ans: <a href = “www.gmail.com”>
<img src = “flower.jpg” alt =”flower” height=50 width=50> </a>
8. Create a simple login page that contains two textboxes where the user will enter the name and
password. It must have a submit button.
Ans: <html>
<head><title> Login page</title></head>
<body>
<form action=”login.php” method=”get”>
Username <br><input type=”text’ name=”uname”> <br>
Password <br><input type=”text’ name=”pwd”> <br>
<br>
<input type="submit" name="sub">
</form></body></html>
9. How can you add a drop-down menu to select an elective subject in your school’s registration form?
Write the HTML code for the same.
Ans: I can create a drop-down list using the select element in HTML. For example : To create a drop
down menu in my school
registration form ‘Register.php’
<form action=”Register.php”>
<select name =”subject”>
<option value =”Subject_1”>Subject_1</option>
<option value =”Subject_2”>Subject_2</option>
<option value =”Subject_3”>Subject_3</option>
</select>
<br><br>
<input type="submit" name="sub">
</form>
QIII. Do as Directed:
1. Identify the attribute of the table tag that should be used for the following i. Add an image as the
background of the table.
Ans. BACKGROUND
ii. Specify extra space around the contents of a cell.
Ans. CELLPADDING
2. Which attribute of the image tag should be used for the following?
a) Specify the thickness of the border around the image.
Ans. BORDER
b) Specify alternate text if the image cannot be displayed.
Ans. ALT
3. Observe the HTML code used to create the following table and answer the questions given below.
ii. Modify the HTML code to merge cells across 3 columns and get the following result.