Class 10 HTML Worksheet: The <a>
(Anchor) Tag
Part A: Fill in the Blanks
- The
<a>
tag is used to create __________ in HTML. - The
href
attribute in the<a>
tag specifies the __________ of the page or resource. - The text or content inside the
<a>
tag is called the __________ text. - To open a link in a new tab or window, we use the
__________
attribute with the value_blank
. - The
<a>
tag is a(n) __________ element, meaning it can contain both text and other elements.
Part B: True or False
- The
<a>
tag is used to create links to other web pages or resources. (True / False) - The
href
attribute is optional for the<a>
tag. (True / False) - The
target="_blank"
attribute opens the link in the same window. (True / False) - You can use the
<a>
tag to create email links using themailto:
scheme. (True / False) - The text inside the
<a>
tag is visible as the clickable link on the webpage. (True / False)
Part C: Short Answer Questions
- What is the purpose of the
<a>
tag in HTML? - Write the HTML code to create a link to "https://smarttricks-tips.blogspot.com/" with the text "Visit Example."
- How can you use the
<a>
tag to create a link that opens in a new tab? Provide an example. - Write the HTML code to create an email link that opens a new email window when clicked. Use the email address
info@example.com
. - Explain the difference between absolute and relative URLs in the
href
attribute of the<a>
tag.
Part D: Practical Exercises
Create an HTML document with the following links:
- A link to "https://smarttricks-tips.blogspot.com/" with the text "Go to Google."
- A link to "about.html" (a page in the same directory) with the text "About Us."
- A link to "https://smarttricks-tips.blogspot.com/" that opens in a new tab.
Write the HTML code to create a link that downloads a file named
document.pdf
when clicked.Create an unordered list of three websites you frequently visit, and link each list item using the
<a>
tag.Write the HTML code for a webpage that contains an anchor link (jump link) to another section on the same page. Create two sections, "Introduction" and "Conclusion," and link them.
Part E: Code Correction
Examine the following HTML code and correct the mistakes related to the <a>
tag. Rewrite the correct code.
<!DOCTYPE html>
<html>
<head>
<title>Anchor Example</title>
</head>
<body>
<a href="https://smarttricks-tips.blogspot.com/">Click here</a
<a target="_blank" href="page.html"Go to Page</a>
</body>
</html>
0 Comments
Please do note create link post in comment section