MBOSE Class X Computer Science · Chapter 7
HTML Images, Links, Tables and Frames
Live nowLearn to add images, links, tables and frames to your web pages with HTML, and to find and fix mistakes in your code.
14 lessons · 110 practice questions
What this chapter covers
- The IMG tag and its attributes
- Hyperlinks with the anchor tag (HREF, NAME, TARGET, mailto)
- Link colours
- Tables (TABLE, CAPTION, TR, TH, TD and their attributes, ROWSPAN, COLSPAN)
- Frames (FRAMESET with ROWS and COLS, FRAME, NOFRAMES, nested frames)
- Debugging HTML
Key terms
- IMG
Meaning: tag that inserts a picture
Example:
<IMG SRC="a.jpg">- SRC
Meaning: source file of a picture or frame
Example:
SRC="lotus.jpg"- ALT
Meaning: text shown if the picture cannot load
Example:
ALT="Lotus"- hyperlink
Meaning: clickable text or picture that opens another page
- anchor tag
Meaning: the A tag that makes links
Example:
<A>- HREF
Meaning: address the link opens
Example:
HREF="page2.html"- anchor text
Meaning: the clickable words of a link
Example: "Visit MBOSE"
- mailto
Meaning: link that opens a new email
Example:
mailto:a@b.in- cell
Meaning: one box of a table
- CELLPADDING
Meaning: space inside a cell around its content
- CELLSPACING
Meaning: space between cells
- COLSPAN
Meaning: merges cells across columns
Example:
COLSPAN="2"
Important questions with answers
10 of the 110 questions on this chapter, solved.
Question 1 · Multiple choice · 1 mark
The tag used to insert a picture is
- (a)
<A> - (b)
<PIC> - (c)
<SRC> - (d)
<IMG>
Answer: (d)
<IMG>It is an empty tag.
- (a)
Question 2 · Multiple choice · 1 mark
Which
<A>tag attribute names a portion of the same or another document?- (a) HREF
- (b) SRC
- (c) ALT
- (d) NAME
Answer: (d) NAME
MBOSE SSLC 2024, Q1(d).
Question 3 · Multiple choice · 1 mark
The title of a table is given by
- (a)
<HEAD> - (b)
<TITLE> - (c)
<TH> - (d)
<CAPTION>
Answer: (d)
<CAPTION>SSLC 2025, Q42.
- (a)
Question 4 · Multiple choice · 1 mark
The tag that divides the browser window into frames is
- (a)
<TABLE> - (b)
<FRAME> - (c)
<FRAMESET> - (d)
<DIV>
Answer: (c)
<FRAMESET>SSLC 2025, Q43.
- (a)
Question 5 · Assertion and reason · 1 mark
Assertion (A):
<IMG>has no closing tag.Reason (R):
<IMG>is an empty tag.- (a) Both A and R are true, and R is the correct explanation of A.
- (b) Both A and R are true, but R is not the correct explanation of A.
- (c) A is true, but R is false.
- (d) A is false, but R is true.
Answer: (a) Both A and R are true, and R is the correct explanation of A.
Empty tags enclose no content.
Question 6 · Short answer · 2 marks
List the attributes of the IMG tag.
Answer
SRC, ALT, WIDTH, HEIGHT, BORDER, ALIGN, HSPACE and VSPACE.
Question 7 · Short answer · 2 marks
Write the code for an email link.
Answer
<A HREF="mailto:office@school.in">Mail us</A>.Question 8 · Short answer · 3 marks
Write three advantages and one disadvantage of frames.
Answer
A menu stays fixed; several pages can be seen at once; only one part needs reloading. Disadvantage: hard to bookmark and print (not in HTML5).
Question 9 · Long answer · 5 marks
Write an HTML code to split the browser window into four rectangular windows using frames, and the code for the first frame to display WebPage 1.
Answer
<HTML> <HEAD><TITLE>Four Windows</TITLE></HEAD> <FRAMESET ROWS="50%,50%" COLS="50%,50%"> <FRAME SRC="page1.html"> <FRAME SRC="page2.html"> <FRAME SRC="page3.html"> <FRAME SRC="page4.html"> </FRAMESET> </HTML>page1.html:<HTML><BODY><H1>WebPage 1</H1></BODY></HTML>.Question 10 · Long answer · 5 marks
Explain the IMG tag and its attributes with an example.
Answer
IMG is an empty tag that inserts a picture. SRC gives the file; ALT the text if it cannot load. WIDTH and HEIGHT set the size; BORDER a frame line. ALIGN sets the position (TOP, MIDDLE, BOTTOM, LEFT, RIGHT); HSPACE and VSPACE add space. Example:
<IMG SRC="lotus.jpg" ALT="Lotus" WIDTH="200" ALIGN="LEFT">.
Study the whole chapter
14 step-by-step lessons, all 110 practice questions with hints, flashcards and mock tests for MBOSE Class X Computer Science.