A server stores ten pages at http://www.yourname.com/var.html, with var=1,...,10. Page W1 (var=1) is saved locally for editing/testing, while the other pages stay on the server. W1 contains relative links of the form “var.html”. Which addition makes all relative links resolve to the server pages? Printed options (including their malformed attribute punctuation): (A) <a href: “http://www.yourname.com/”, href: “...var.html”>; (B) <base href: “http://www.yourname.com/”>; (C) <a href: “http://www.yourname.com/”>; (D) <base href: “http://www.yourname.com/”, range: “...var.html”>. Distinguish the intended element from valid HTML syntax.
Answer & solution
Official answer: B
Our answer: B conceptually, after fixing HTML attribute syntax
1. A base element sets the base URL used to resolve relative links, so the intended B is <base href="http://www.yourname.com/">.
2. Anchor elements only make individual links. The printed options use href: rather than href=; literal B therefore is not the required valid HTML attribute assignment. Retain the official conceptual answer with the syntax correction explicit.
Original paper, page 59 · Answer key