HTML5: How to specify the relationship between the current document and the target URL?
Solution:
HTML Code :
Explanation:
- The <!DOCTYPE html> declaration specifies the document type and version of HTML.
- The <html> element is the root element of the HTML document.
- The <head> section contains metadata about the HTML document, such as character encoding and title.
- The <meta> tag sets the character encoding of the document to ISO-8859-1.
- The <title> tag sets the title of the HTML page.
- The <body> element contains the visible content of the HTML document.
- The <img> tag displays an image with the specified source, dimensions, and attributes, including an alternate text for accessibility, and an associated image map.
- The <map> element defines an image map with the name "Map".
- The <area> tags define clickable areas within the image map, each with a specific shape, coordinates, hyperlink, alternate text, and a relationship attribute "alternate" specifying the relationship between the current document and the target URL.
Live Demo:
See the solution in the browser
Supported browser
![]() |
![]() |
![]() |
![]() |
![]() |
Yes | Yes | Yes | Yes | Yes |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.