In the HTML 4.01 DTD for the <a> element, which attribute is annotated as the…
2022
In the HTML 4.01 DTD for the <a> element, which attribute is annotated as the “named link end”?
Answer: D. NAME — Concept: An internal HTML link has a source anchor and a destination anchor. A fragment such as #section1 identifies a destination inside the same document.…
- A.
HREF
- B.
ID
- C.
ACTION
- D.
NAME
Attempted by 823 students.
Show answer & explanation
Correct answer: D
Concept: An internal HTML link has a source anchor and a destination anchor. A fragment such as #section1 identifies a destination inside the same document.
HTML 4.01 distinguishes two anchor-naming mechanisms: name is the a-element attribute whose DTD annotation is “named link end”, while the global id attribute may also create an anchor on any element, including a. The href attribute belongs to the source anchor and supplies the URI or fragment that identifies the destination.
Application: The stem asks specifically for the a-element DTD attribute annotated “named link end”, not every attribute capable of creating a fragment target. That annotation belongs to NAME.
Contrast: The offered attributes have these specification roles:
HREF: gives an a-element source anchor its linked-resource URI.
ID: gives any element a document-wide identifier and may also create an anchor.
ACTION: gives a form the URI that processes its submission.
NAME: gives an HTML 4.01 a element its named link end.
Cross-check: The HTML 4.01 a-element declaration lists name as “named link end” and href as “URI for linked resource”; id appears separately among the global attributes.
Result: NAME.
A video solution is available for this question — log in and enroll to watch it.