1. How we can add a background color in HTML?
a) <marquee bg color: "red">
b) <marquee bg-color = "red">
c) <marquee bgcolor = "red">
d) <marquee color = "red">
Explanation: The bgcolor attribute is used to set the background color of an HTML element.
2. Which of the following statement is true?
a) SVG needs scripts to draw elements
b) In canvas, drawing is done with pixels
c) SVG don’t support to event handlers
d) Canvas Contains built-in animations
Explanation: In SVG drawing is done with vectors and it support event handlers. Canvas doesn’t contain any built-in-animations and drawing is done with pixels.
3. A program in HTML can be rendered and read by -
a) Web browser
d) None of the above
Explanation: HTML programs can be read and rendered by the web browser. A web browser can support several web pages.
4. What if one does not use the doctype in the starting of HTML document?
a) Browser stops working
b) Browser crashes after showing the page
c) Browser finds the document in quirky mode
d) Browser finds a document in standard mode
Explanation: If the browser finds in the starting of an HTML document it sets the document in standard mode but if one does not use a doctype, the browser goes to quirky mode. In this mode, certain content will not be displayed as per one wrote that. So, it is always recommended to write a doctype at the very start of the HTML document.
5. Which of the following about HTML in incorrect?
a) HTML can be used for creation of web pages.
b) HTML is a Markup language.
c) HTML is a programming language.
d) HTML is not a programming language.
Explanation: HTML is not a programming language.
6. Which of the following is the corret statement for HTML?
a) Exo is a cloud-based ide that offers collaboration and deployment features
b) Exo does not support java and python
d) Both a and c
7. Which of the following is the attribute that is used to set a global identifier for a microdata item?
Explanation: Itemid allows a vocabulary to define a global identifier for a microdata item, for example an ISBN number on a book.
8. In order to display the contents as follows:
Sub-sub-headings- Heading tags
Which one of the following options will be most preferred as tags for each of the above line respectively?
Explanation: In HTML, the content between the heading tags <h1> and </h1> has the biggest size and it keeps on decreasing as we move towards <h6>.
9. With respect to the HTML code given below, which line will have the highest font size?
<h1 style="font-size:15px;">Heading 1</h1>
<h3 style="font-size:30px;">Heading 3</h3>
<h5 style="font-size:20px;">Heading 5</h5>
a) Heading 1
b) Heading 3
c) Heading 5
d) All of the above
Explanation: The browser will modify the size of the fonts of headings as per the size given in the attribute font-size.
10. On execution of below HTML code, size of World will be equal to size of which HTML tag?
Explanation: Property of the text World will be determined by the innermost tag i.e, <h1>