This set of HTML Questions & Answers for Exams focuses on “Headings, Paragraphs, Tags & Linking between Pages”.
1. For explaining, which new technology is used?
Explanation: When for the first time when we explain any new terminology like any jargon or any academic concept in the document we use <dfn> It is defining an instance of it. It is used for defining an instance of a new term. In some browsers, the content of <dfn> are shown in italics but in Chrome and Safari, nothing will be changed.
2. Which element indicates about something which is no longer accurate?
Explanation: <s> indicates about something that is no longer relevant or accurate. It should also not to be deleted. The content of this element is displayed a line through the center. In older versions of HTML it had <u> element for the content to be underlined, but now it is no longer in use.
3. Metadata does not define _________
a) character set
Explanation: Metadata define character set, title of the document, links, styles, scripts and other meta information. E.g. <!doctype html> <html> <title> The Code </title> <meta charset= “UTF-8”> </head> <body>.
4. In HTML5 which element defines thematic change in the content?
Explanation: For thematic change in the content <hr> tag is used. It is also used to separate content or for defining a change in any HTML page. All the browsers like Internet Explorer, Firefox, Opera, Chrome, Safari supports this element.
5. Which element defines preformatted text?
Explanation: Preformatted test is defined by <pre> element. The text written inside this element will be displayed in fixed-width font. It also preserves line breaks and spaces. E.g. <pre> This is the first line. </pre>.
6. Which element is used for creating links?
Explanation: <a> element is used for creating links. We can click anything written between opening <a> tag and closing </a> tag. E.g. <a href= “http://www.gmail.com”> GMAIL </a>. The text written between <a> and </a> is called link text.
7. Relative URLs are used to ____________
a) link other pages within the same site
b) link the same page with other sites
c) link other pages with other sites
d) does not link
Explanation: Relative URLs are used for linking other pages within the same site. These are the shorthand version of absolute URLs. It does not need a domain name. These URLs are helpful when building a site on a computer because we can create links between pages without having set up for hosting or domain name.
8. What is the color of an unvisited link?
Explanation: In all browsers by default the color of an unvisited link is blue. The color of a visited link is purple. The color of the active link is red. The link is underlined by default. E.g. www.google.com We can also change these default colors by the use of style.
9. Which one of the following is not the value of the target attribute?
Explanation: Where to open linked document is specified by target attribute. It can have the values _blank, _top, _parent, _self, framename. _blank opens linked document is a new tab or window. The linked document is opened in the parent frame by _parent. Linked document is opened in a named frame by framename. Linked document is opened in the same window by _self.
10. What is the path for an image located in same folder as the current page?
a) <img src= “pic.jpg”> b) <img src= “../pic.jpg”> c) <img src= “images/pic.jpg”> d) <img src= “/images/pic.jpg”>
Explanation: The path <img src= “pic.jpg”> indicates that pic.jpg is located in same folder as current page. The path <img src= “images/pic.jpg”> indicates that pic.jpg is located in current folder. The path <img src= “/images/pic.jpg”> is located in images folder at root of current web. The path <img src= “../pic.jpg”> indicates that pic.jpg is located in folder one level up from current folder.
11. File paths are not used for linking in _________
c) Style Sheets
12. For defining bookmarks in a page we use __________
Explanation: id attribute is used for defining bookmarks in a page. For linking to the bookmark we use href attribute. Target attribute is used to define where to open a linked document. <a> element is used to define a link.
Sanfoundry Global Education & Learning Series – HTML.
To practice all exam questions on HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.