Web Technology Questions and Answers – Creating Links with <a> Element

This set of Web Technology Multiple Choice Questions & Answers (MCQs) focuses on “Creating Links with <a> Element”.

1. What is a source anchor?
a) The target of a link within a document
b) Breaking down the webpage to avoid scrolling
c) Allows to create link without using href attribute
d) It is the link leading to no other links
View Answer

Answer: a
Explanation: Any text contained between the opening < a > tag and closing < /a > tag forms part of the link that a user can click on. The URL the user should be taken to is specified as the value of the href attribute. You need to specify a destination anchor only if you want to link to a specific part of a page.

2. How to construct a destination anchor?
a) Using href attribute
b) Using id attribute
c) Using base attribute
d) Using src attribute
View Answer

Answer: b
Explanation: The name attribute is also used instead of id attribute. The value of a name or id attribute should be unique within the page. It is important for destination anchors to always have some content; otherwise some browsers will not find the destination.

3. How to control other attributes of the email?
a) By directly writing another attribute after the email address
b) By using the two or more attributes without any whitespaces
c) By placing + symbol after the email address
d) By placing? symbol after the email address
View Answer

Answer: d
Explanation: Placing a question mark after the e – mail address and then use name/value pairs to specify the additional properties. The name and the value are separated by an equal sign. You can specify more than one property by separating the name/value pairs with an ampersand.
advertisement
advertisement

4. Which is not a property to add to the email?
a) Header
b) Subject
c) Body
d) CC/BCC
View Answer

Answer: a
Explanation: Header is not a property of the email. Subject property allows to add a subject line to your email. Adds a message into the body of the e – mail. While CC and BCC sends a carbon copy of the mail to the CC ’ d address and Secretly sends a carbon copy of the mail to the BCC ’ d address without any recipient seeing any other recipients respectively.

5. Which of the following is used to add space in between the word of subject line?
a) %20
b) +20
c) <20>
d) #20
View Answer

Answer: a
Explanation: If you want to add a space between any of the words in the subject line, you should add %20 between the words instead of the space. Adding white spaces won’t result in spaces. Using % symbol followed by a number gives space accordingly.

6. Why is access key attribute used?
a) To specify an alternative text to be used
b) To indicate the character encoding of the document the URL points to
c) To declare the language of a document
d) For creating a keyboard shortcut that can be used to activate a link
View Answer

Answer: d
Explanation: In some browsers, when a link is activated the browser immediately follows the link. In some other browsers, the link is just highlighted, and the user has to press the Enter key for the link to be followed. The access key attribute should be specified on the source anchor.

7. Relationship between the current document and the resource is indicated by ________
a) the charset Attribute
b) the rel Attribute
c) the coords Attribute
d) the hreflang Attribute
View Answer

Answer: b
Explanation: The rel attribute is used on source anchor. Automated applications could be written to use this attribute. Few values for rel attribute are index, glossary, start.
advertisement

8. What is tabindex attribute for?
a) Allows you to specify the order in which, when the Tab key is pressed, the links obtain focus
b) The document you are linking to will open in the same browser window
c) Processes the information submitted via form
d) Shows the list of supported charsets
View Answer

Answer: a
Explanation: When a link receives focus, and the user presses Enter on the keyboard, the link is activated. When the user clicks the Tab key, you may want the focus to land on the key items on the page that the user might want to interact with. It cycles around the same elements again as you keep pressing Tab.

9. What is the value of tabindex attribute?
a) 1-1024
b) 1-4096
c) 0-32767
d) 0-5435
View Answer

Answer: c
Explanation: The value of the tabindex attribute is a number between 0 and 32767. A link whose tabindex attribute has a value of 1 receives focus before a link with a tabindex value of 20. If a value of 0 is used, the links appear in the order in which they appear in the document.
advertisement

10. What is the purpose of type value?
a) Specifies the MIME type of the link
b) Specifies the type of the domain
c) Specifies the type of the alignment of elements
d) Specifies the type of language
View Answer

Answer: a
Explanation: MIME types can be compared to file extensions, but are more universally accepted across different operating systems. For example, an HTML page would have the MIME type text/html, whereas a JPEG image would have the MIME type img/jpeg. The browser could use the information in the type attribute to either display it differently or indicate to the user what the format of the destination is.

Sanfoundry Global Education & Learning Series – Web Technology.

To practice all areas of Web Technology, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.