CLASS X CA 165 BODY TAG MCQ QUESTIONS

  1. Which of the following is the correct description of the <body> tag in HTML?

    • a) Defines the metadata of the HTML document
    • b) Defines the structure of the webpage
    • c) Defines the main content of the HTML document
    • d) Defines the style of the webpage
    • Answer: c) Defines the main content of the HTML document
  2. Where should the <body> tag be placed in an HTML document?

    • a) Before the <head> tag
    • b) Inside the <title> tag
    • c) After the <head> tag
    • d) Inside the <meta> tag
    • Answer: c) After the <head> tag
  3. Which of the following elements can be placed inside the <body> tag?

    • a) <meta>
    • b) <title>
    • c) <h1>
    • d) <style>
    • Answer: c) <h1>
  4. What will happen if there is no <body> tag in an HTML document?

    • a) The document will not load
    • b) Only the metadata will be displayed
    • c) The webpage content will not be visible
    • d) The browser will display an error message
    • Answer: c) The webpage content will not be visible
  5. Which of the following is true about the <body> tag in HTML5?

    • a) It can be placed inside the <head> section
    • b) It contains all the visible content on the webpage
    • c) It can only contain text content
    • d) It is used to define links only
    • Answer: b) It contains all the visible content on the webpage


  1. Which attribute of the <body> tag is used to set the background color of the webpage?

    • a) bgcolor
    • b) background
    • c) color
    • d) text
    • Answer: a) bgcolor
  2. Which of the following is true about the <body> tag's background attribute in HTML?

    • a) It is used to set the color of text inside the body
    • b) It sets an image as the background of the webpage
    • c) It changes the background color
    • d) It adds a border around the body content
    • Answer: b) It sets an image as the background of the webpage
  3. Which version of HTML deprecated the use of the bgcolor attribute in the <body> tag?

    • a) HTML 3.2
    • b) HTML 4.01
    • c) XHTML 1.0
    • d) HTML5
    • Answer: d) HTML5
  4. In which part of the HTML document is the <body> tag located?

    • a) The document head
    • b) Inside the <title> tag
    • c) After the closing <html> tag
    • d) Between the opening and closing <html> tags
    • Answer: d) Between the opening and closing <html> tags
  5. Which attribute of the <body> tag can be used to change the color of links after they have been clicked?

    • a) link
    • b) hover
    • c) vlink
    • d) alink
    • Answer: c) vlink
  6. What is the purpose of the alink attribute in the <body> tag?

    • a) To change the color of active links
    • b) To define the alignment of links
    • c) To set the background image for links
    • d) To make links underlined
    • Answer: a) To change the color of active links
  7. Which of the following attributes was removed in HTML5 from the <body> tag?

    • a) link
    • b) background
    • c) bgcolor
    • d) All of the above
    • Answer: d) All of the above
  8. Which element is considered part of the content placed inside the <body> tag?

    • a) <script>
    • b) <meta>
    • c) <link>
    • d) <style>
    • Answer: a) <script>
  9. What happens if you place multiple <body> tags in an HTML document?

    • a) Both <body> sections will be displayed
    • b) The browser will show an error
    • c) Only the first <body> section will be rendered
    • d) The last <body> section will overwrite the first one
    • Answer: c) Only the first <body> section will be rendered
  10. Which of the following is an incorrect use of the <body> tag?

    • a) Placing text inside it
    • b) Adding images
    • c) Using external links
    • d) Defining the document's metadata
    • Answer: d) Defining the document's metadata


  1. Which of the following HTML tags cannot be placed directly inside the <body> tag?
  • a) <div>
  • b) <table>
  • c) <meta>
  • d) <h1>
  • Answer: c) <meta>
  1. Which of the following best describes the role of the <body> tag in an HTML document?
  • a) To define the document's structure
  • b) To store the webpage's content that will be visible to the user
  • c) To declare the styling of the page
  • d) To define the links and scripts of the webpage
  • Answer: b) To store the webpage's content that will be visible to the user
  1. The <body> tag can contain which of the following?
    • a) <div>, <header>, <footer>
    • b) <title>, <meta>, <link>
    • c) <script>, <style>, <head>
    • d) None of the above
    • Answer: a) <div>, <header>, <footer>
  • a) To display a popup message when the page is fully loaded
  • b) To load external files into the body
  • c) To validate the form content before submitting
  • d) To trigger a click event on the body
  • Answer: a) To display a popup message when the page is fully loaded
  1. Which of the following tags must be outside of the <body> tag in a valid HTML document?
  • a) <header>
  • b) <footer>
  • c) <html>
  • d) <nav>
  • Answer: c) <html>
  1. What does the following HTML code do?
<body bgcolor="#FFFFFF">
  • a) Sets the font color of the text
  • b) Sets the background color of the page to white
  • c) Changes the color of hyperlinks
  • d) Sets the image background to white
  • Answer: b) Sets the background color of the page to white
  1. What is the default behavior of content placed inside the <body> tag?
  • a) It is hidden from the user
  • b) It appears in the browser window as visible content
  • c) It is placed within the metadata of the page
  • d) It is only accessible via a special link
  • Answer: b) It appears in the browser window as visible content
  1. Which of the following is a deprecated attribute of the <body> tag in HTML5?
  • a) onload
  • b) bgcolor
  • c) style
  • d) id
  • Answer: b) bgcolor
  1. Which event attribute of the <body> tag can be used to execute a script when the user moves the mouse over the page?
  • a) onclick
  • b) onmouseover
  • c) onload
  • d) onmousemove
  • Answer: b) onmouseover
  1. What will the following code do in an HTML5 document?
<body style="background-color: lightblue;">
  • a) Change the text color to light blue
  • b) Change the background color of the webpage to light blue
  • c) Insert a light blue border around the body content
  • d) Add a light blue image to the background
  • Answer: b) Change the background color of the webpage to light blue
  1. In an HTML document, the <body> tag should ideally be placed after which tag?
  • a) <html>
  • b) <head>
  • c) <title>
  • d) <meta>
  • Answer: b) <head>

Post a Comment

0 Comments