Class 10 HTML Worksheet: The a (Anchor) Tag

Class 10 HTML Worksheet: The <a> (Anchor) Tag

Part A: Fill in the Blanks

  1. The <a> tag is used to create __________ in HTML.
  2. The href attribute in the <a> tag specifies the __________ of the page or resource.
  3. The text or content inside the <a> tag is called the __________ text.
  4. To open a link in a new tab or window, we use the __________ attribute with the value _blank.
  5. The <a> tag is a(n) __________ element, meaning it can contain both text and other elements.

Part B: True or False

  1. The <a> tag is used to create links to other web pages or resources. (True / False)
  2. The href attribute is optional for the <a> tag. (True / False)
  3. The target="_blank" attribute opens the link in the same window. (True / False)
  4. You can use the <a> tag to create email links using the mailto: scheme. (True / False)
  5. The text inside the <a> tag is visible as the clickable link on the webpage. (True / False)

Part C: Short Answer Questions

  1. What is the purpose of the <a> tag in HTML?
  2. Write the HTML code to create a link to "https://smarttricks-tips.blogspot.com/" with the text "Visit Example."
  3. How can you use the <a> tag to create a link that opens in a new tab? Provide an example.
  4. Write the HTML code to create an email link that opens a new email window when clicked. Use the email address info@example.com.
  5. Explain the difference between absolute and relative URLs in the href attribute of the <a> tag.

Part D: Practical Exercises

  1. Create an HTML document with the following links:

  2. Write the HTML code to create a link that downloads a file named document.pdf when clicked.

  3. Create an unordered list of three websites you frequently visit, and link each list item using the <a> tag.

  4. 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>

Post a Comment

0 Comments