Q1. Which of the following is not a link state?
a) A:Link
b) A:Active
c) A:Over
d) A:Hyperlink
Answer: d) Hyperlink
Q2. It defines the document to which the link leads.
a) src
b) href
c) border
d) none of these
Answer: b) href
Q3. This enables the user to divide a page into a number of rectangular segments for different purposes.
a) Windows
b) Frame
c) Hyperlink
d) Images
Answer: b) Frame
Q4. The ___ tag is used to create hyperlinks in a web page.
a) <a> tag
b) <link> tag
c) <iframe> tag
d) <img> tag
Answer: a) <a> tag
B. Write True or False
Q1. External linking serves as a bookmark to go to a particular segment of the web page.
Answer: False
Q2. We can display links as buttons using CSS styling.
Answer: True
Q3. When we double-click any hyperlink, the linked document opens.
Answer: True
Q4. The “a:hover” link state must come after “a:link” and “a:visited” link states.
Answer: True
Q5. To create a form in HTML5, the <iframe> tag is used.
Answer: False
C. Fill in the Blanks
Q1. Linking involves linking various sections of the ____ web page.
Answer: same web page
Q2. ____ allow multiple HTML documents to be presented as independent windows within one browser window.
Answer: Frames
Q3. The ____ attribute is used to specify an alternative text that a browser will display if the image cannot be displayed.
Answer: alt
Q4. The ____ tag is used to create hyperlinks.
Answer: <a>
Q5. The ____ attribute is used to define the web address or path of the linked document.
Answer: href
D. Answer the Following Questions
Q1. Explain the different types of linking.
Answer:
There are two main types of linking in HTML:
Internal Linking:
Used to link different sections of the same web page using bookmarks or IDs.
External Linking:
Used to connect one web page to another page or website using the href attribute in the <a> tag.
Example:
Html
<a href="#section1">Go to Section 1</a> <!-- Internal link -->
<a href="https://www.google.com"> Google</a> <!-- External link -->
Q2. How can we link web pages in HTML?
Answer:
We can link web pages in HTML using the anchor (<a>) tag and the href attribute.
The href attribute defines the path or URL of the linked document.
Example:
Html
<a href="page2.html">Go to Page 2</a>
When clicked, this opens “page2.html” in the browser.
Q3. Explain the uses of frames in HTML5 in detail.
Answer:
Frames were used in older versions of HTML to divide a browser window into multiple rectangular sections, each displaying a separate HTML document.
However, in HTML5, frames are no longer supported because they caused usability and SEO issues.
Instead, developers now use iframes (inline frames) to embed content.
Uses of Frames (before HTML5):
- To display multiple web pages within a single window.
- To create navigation menus and content areas separately.
- To load content from different sources without refreshing the entire page.
Modern Alternative:
In HTML5, use the <iframe> tag to achieve a similar effect safely and efficiently.
Q4. How can we display an inline frame with a border?
Answer:
In HTML5, an inline frame (iframe) can be displayed with a border by using either the frameborder attribute or CSS styling.
Example 1: Using frameborder attribute
Html
<iframe src="example.html" width="600" height="400" frameborder="1"></iframe>
Here, frameborder="1" adds a visible border around the iframe.
Example 2: Using CSS border property
Html
<iframe src="example.html" width="600" height="400" style="border: 2px solid black;"></iframe>
This adds a 2-pixel solid black border around the inline frame.

No comments:
Post a Comment