HTML MCQ Questions And Answers Part 1 - PrepBharat

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">View AnswerAnswer: cExplanation: 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 elementsb) In canvas, drawing is done with pixelsc) SVG don’t support to event handlersd) Canvas Contains built-in animationsView AnswerAnswer: bExplanation: 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 browserb) Serverc) Interpreterd) None of the aboveView AnswerAnswer: aExplanation: 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 workingb) Browser crashes after showing the pagec) Browser finds the document in quirky moded) Browser finds a document in standard modeView AnswerAnswer: cExplanation: 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.View AnswerAnswer: cExplanation: 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 featuresb) Exo does not support java and pythonc) Exo supports javascript and html5d) Both a and cView AnswerAnswer: dExplanation: Exo provides a free, cloud-based IDE that offers collaboration and deployment features. In addition to HTML5 and JavaScript, it supports the development of Java, Ruby, and Python applications.

7. Which of the following is the attribute that is used to set a global identifier for a microdata item?a) keyb) idc) itemclassd) itemidView AnswerAnswer: dExplanation: 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:Headings- HTMLSub-heading- ElementsSub-sub-headings- Heading tagsWhich one of the following options will be most preferred as tags for each of the above line respectively?a) <h1>,<h2>,<h3>b) <h3>,<h2>,<h1>c) <h6>,<h5>,<h4>d) <h5>,<h3>,<h1>View AnswerAnswer: aExplanation: 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?<!DOCTYPE html><html><body><h1 style="font-size:15px;">Heading 1</h1><h3 style="font-size:30px;">Heading 3</h3><h5 style="font-size:20px;">Heading 5</h5></body></html>a) Heading 1b) Heading 3c) Heading 5d) All of the aboveView AnswerAnswer: bExplanation: 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?<!DOCTYPE html><html><body><h4><h2><h3><h1>World</h1></h3></h2></h4></body></html>a) h1b) h2c) h3d) h4View AnswerAnswer: aExplanation: Property of the text World will be determined by the innermost tag i.e, <h1>

Từ khóa » H1 /h1 H2 /h2 H3 /h3 Mcq