MCQs on Basic Tags and Elements | HTML



Chapter 2: Basic Tags and Elements in HTML is crucial for understanding the structure and formatting of web pages. This chapter covers essential tags like <html>, <head>, <body>, headings, paragraphs, and line breaks. Below are 30 multiple-choice questions (MCQs) to test your knowledge on these fundamental HTML elements.

Section 1: <html>, <head>, and <body>

1. What tag is used to define the structure of a web page in HTML?
a) <body>
b) <html>
c) <head>
d) <footer>

2. Which of the following tags is used to include metadata in a webpage?
a) <body>
b) <head>
c) <footer>
d) <html>

3. The content that appears on a web page is placed inside which tag?
a) <html>
b) <body>
c) <head>
d) <footer>

4. What is the first tag that should be written in any HTML document?
a) <head>
b) <html>
c) <body>
d) <header>

5. Which tag is used to contain scripts, styles, and meta-information in a webpage?
a) <head>
b) <body>
c) <html>
d) <footer>

Section 2: Headings (<h1> to <h6>)

6. What does <h1> represent in HTML?
a) A paragraph
b) A line break
c) A primary heading
d) A footer

7. Which heading tag has the highest level of importance?
a) <h1>
b) <h6>
c) <h3>
d) <h5>

8. How many heading tags are there in HTML?
a) 5
b) 6
c) 7
d) 8

9. The <h2> tag is used to define which level of heading?
a) Second-level
b) First-level
c) Sixth-level
d) Third-level

10. Which tag would you use for the least important heading?
a) <h1>
b) <h3>
c) <h6>
d) <h4>

11. What is the default font size for <h1> in most browsers?
a) 16px
b) 32px
c) 48px
d) 64px

12. Which of the following tags will create the smallest heading?
a) <h1>
b) <h4>
c) <h5>
d) <h6>

Section 3: Paragraphs (<p>)

13. Which tag is used to define a paragraph in HTML?
a) <h1>
b) <p>
c) <div>
d) <header>

14. What is the default behavior of the <p> tag in terms of spacing?
a) No spacing
b) It adds a space before and after the text
c) Adds a line break before
d) Adds a border

15. How do you define a block of text as a paragraph in HTML?
a) <paragraph>
b) <p>
c) <text>
d) <block>

16. Can the <p> tag be nested inside another <p> tag?
a) Yes
b) No
c) Only in some browsers
d) Only in <div>

17. What does the <p> tag do in HTML?
a) Adds a list item
b) Adds a hyperlink
c) Defines a block of text
d) Creates a heading

18. The <p> tag automatically adds space before and after its content. What is this space called?
a) Margin
b) Padding
c) Border
d) Gap

Section 4: Line Breaks (<br>)

19. What does the <br> tag do in HTML?
a) Breaks a link
b) Adds a new line in text
c) Breaks a paragraph into two
d) Ends a block of text

20. Is the <br> tag self-closing in HTML?
a) Yes
b) No
c) Only in XHTML
d) Depends on the browser

21. How do you insert multiple line breaks in a row in HTML?
a) Use the <p> tag
b) Use multiple <br> tags
c) Use the <hr> tag
d) Use the <h1> tag

22. What tag would you use to start a new line without creating a new paragraph?
a) <p>
b) <div>
c) <br>
d) <span>

23. Which of the following is true about the <br> tag in HTML?
a) It creates a paragraph.
b) It creates a new line without space.
c) It makes a heading.
d) It changes text color.

24. Where is the <br> tag typically used in HTML?
a) Inside a paragraph
b) In the header section
c) Inside an image tag
d) Only within tables

25. How many <br> tags are needed to insert two line breaks in HTML?
a) 2
b) 3
c) 4
d) 1

Mixed Questions

26. Which of the following tags is used to group a section of content together in HTML?
a) <section>
b) <div>
c) <header>
d) <footer>

27. What is the primary purpose of the <head> tag in an HTML document?
a) Contains metadata, links, and scripts
b) Contains the main content of the page
c) Displays images
d) Provides navigation

28. Which tag is used to define the document type in HTML?
a) <html>
b) <!DOCTYPE>
c) <head>
d) <meta>

29. Which tag allows you to add inline styles in the <head> section?
a) <style>
b) <link>
c) <meta>
d) <script>

30. Which tag is used to create a line or horizontal rule in HTML?
a) <hr>
b) <line>
c) <rule>
d) <break>


Answers:

QnoAnswer (Option with Text)
1b) <html>
2b) <head>
3b) <body>
4b) <html>
5a) <head>
6c) A primary heading
7a) <h1>
8b) 6
9a) Second-level
10c) <h6>
11b) 32px
12d) <h6>
13b) <p>
14b) It adds a space before and after the text
15b) <p>
16b) No
17c) Defines a block of text
18a) Margin
19b) Adds a new line in text
20a) Yes
21b) Use multiple <br> tags
22c) <br>
23b) It creates a new line without space
24a) Inside a paragraph
25a) 2
26b) <div>
27a) Contains metadata, links, and scripts
28b) <!DOCTYPE>
29a) <style>
30a) <hr>

Use a Blank Sheet, Note your Answers and Finally tally with our answer at last. Give Yourself Score.

X
error: Content is protected !!
Scroll to Top