HTML Questions and Answers Part-23

1. loop attribute is not used with _____________
a) <audio>
b) <marquee>
c) <video>
d) <track>

Answer: d
Explanation: loop attribute is commonly use with <audio>, <bgsound>, <video>, <marquee> and denotes whether the media should start playing from the beginning when it is finished. <track> element is use with default attribute and it checks whether the track is enabled or not.

2. How does download attribute work?
a) An indication that hyperlink is to be used for downloading
b) Directly downloads as per the need of the user
c) Gives various source links to download
d) List the topics which one can download from a certain page

Answer: a
Explanation: Download attribute basically use by <a> and <area> elements. It shows the hyperlink is to be used to download a resource when user clicks on it.

3. datetime attribute is not related with ______________
a) <del>
b) <time>
c) <ins>
d) <form>

Answer: d
Explanation: datetime shows the date and time related with the element. Commonly use with <del>, <time>, <ins> elements. <del> is use with cite attribute, <ins> is also use with cite attribute, <form> element is use with various attributes like accept, action, accept-charset etc.

4. cols attribute is use with ___________
a) <td>
b) <th>
c) <textarea>
d) <ol>

Answer: c
Explanation: cols indicates number of columns in a certain textarea, use with <textarea> element. <td> element is use with align attribute, <th> is also use with align attribute, <ol> is basically use with reversed attribute.

5. Use of checked attribute is ____________
a) Whether on page load element should be checked
b) Whether on page load all form element should be checked
c) Whether on page load all list element should be checked
d) Whether on page load all multimedia elements should be checked

Answer: a
Explanation: checked is use with <command>, <input> elements and it indicates if element is checked on loading of the page or not.

6. How many standard color names does HTML supports?
a) 120
b) 130
c) 140
d) 90

Answer: c
Explanation: In HTML one can use a color name to specify a color e.g. Tomato, Orange, DodgerBlue, MediumSeaGreen, Gray, SlateBlue, Violet, LightGray etc. For colored fonts, we used text-decoration property to set the color of the text.

7. Which of the following is not set with font-style property?
a) font-style: normal
b) font-style: italic
c) font-style: oblique
d) font-style: capitalize

Answer: d
Explanation: Text-transform: capitalize, capitalizes the first letter of each word whereas font-style set font as normal, italic, oblique. We use text-transform: uppercase and text-transform: lowercase to change the text from lowercase to uppercase and from uppercase to lowercase respectively.

8. What should be set with text-align property so that every line has equal width like in magazines and newspapers?
a) text-align: justify
b) text-align: none
c) text-align: bottom
d) text-align: top

Answer: a
Explanation: By setting text-align property to “justify”, each line is stretched so that every line has equal width, left and right margins are straight like in magazines and newspapers. Text-align: center, text-align: right, text-align: left is also used for aligning the text at center, right and left respectively.

9. Which of the following is not used with text-decoration property?
a) overline
b) underline
c) line-through
d) inline

Answer: d
Explanation: overline, underline, line-through properties are used to decorate the text.

10. Which works similar to <i> element?
a) <strong>
b) <em>
c) <b>
d) <blockquote>

Answer: b
Explanation: <strong> element shows the importance of text/paragraph between it’s tags. <b></b> makes text bolder. A section which is quoted from another source is specified by <blockquote>. <em> element indicates emphasis, browser will show the contents of <em> element in italic.