MCQs on Text Formatting and Styles | HTML

Master the key elements of HTML text formatting and styles with this comprehensive quiz. This set covers the essential tags such as Bold, Italic, Underline, Superscript, Subscript, and Preformatted Text. Perfect for web development students and professionals aiming to enhance their knowledge.

1. Which HTML tag is used to make text bold?
a) <strong>
b) <b>
c) <bold>
d) <em>

2. What does the <i> tag do in HTML?
a) Underlines text
b) Makes text italic
c) Changes text color
d) Displays text in bold

3. How can you underline text in HTML?
a) <u>
b) <underline>
c) <i>
d) <strong>

4. What is the purpose of the <b> tag in HTML?
a) Italicizes text
b) Makes text bold
c) Underlines text
d) Changes text color

5. Which HTML tag is used to emphasize text?
a) <b>
b) <i>
c) <em>
d) <strong>

6. To make text bold and important, which tag is used?
a) <i>
b) <em>
c) <strong>
d) <b>

7. Which tag is used for superscript in HTML?
a) <sub>
b) <sup>
c) <super>
d) <s>

8. In HTML, how do you represent subscript text?
a) <sub>
b) <sup>
c) <underline>
d) <pre>

9. What is the correct HTML tag for superscript text?
a) <sub>
b) <sup>
c) <b>
d) <em>

10. How do you display subscript text in HTML?
a) <sub>
b) <sup>
c) <pre>
d) <b>

11. Which of the following tags is used for displaying superscript text?
a) <sub>
b) <sup>
c) <i>
d) <pre>

12. Which tag is used for creating subscript text in HTML?
a) <sub>
b) <sup>
c) <b>
d) <em>

13. The <pre> tag is used for what purpose in HTML?
a) To make text bold
b) To format text using fixed-width fonts
c) To italicize text
d) To underline text

14. What does the <pre> tag preserve in HTML?
a) White space
b) Text color
c) Background
d) Font family

15. Which tag is used for preformatted text in HTML?
a) <pre>
b) <bold>
c) <code>
d) <p>

16. The text inside the <pre> tag is:
a) Automatically wrapped to fit the screen
b) Displayed in a fixed-width font
c) Italicized
d) Displayed as a hyperlink

17. How is text displayed when wrapped in the <pre> tag in HTML?
a) With no line breaks
b) With font-size change
c) Preserving spaces and line breaks
d) In italics

18. Which of the following does the <pre> tag affect?
a) The style of the font
b) The text alignment
c) White spaces and line breaks
d) The text color

19. What is the main difference between <b> and <strong> tags in HTML?
a) <b> makes text bold, <strong> emphasizes text
b) <b> changes text color, <strong> makes text bold
c) <strong> makes text bold, <b> italicizes text
d) There is no difference

20. Which of the following is true about the <i> tag in HTML?
a) It is used for italicizing text
b) It underlines the text
c) It makes text bold
d) It applies a background color

21. What is the behavior of the <u> tag in HTML?
a) It italicizes text
b) It underlines text
c) It makes text bold
d) It changes the font family

22. How does the <sup> tag modify the text in HTML?
a) Makes the text smaller
b) Places text above the baseline
c) Places text below the baseline
d) Makes the text bolder

23. What is the purpose of the <sub> tag in HTML?
a) To make text bold
b) To make text subscript
c) To italicize text
d) To underline text

24. What happens to the text wrapped in the <pre> tag?
a) The spaces are ignored
b) Line breaks and spaces are preserved
c) The text is italicized
d) The text is colored blue

25. In what scenario would you use the <pre> tag?
a) To display code
b) To underline text
c) To make text bold
d) To add hyperlinks

26. Which of the following is used to add emphasis to text in HTML?
a) <b>
b) <i>
c) <u>
d) <i> or <em>

27. The <sup> tag is often used in which of the following?
a) Subscript
b) Exponents
c) Bold text
d) Italic text

28. Which tag is used for formatting mathematical expressions in HTML?
a) <pre>
b) <i>
c) <sup>
d) <sub>

29. What tag is used to preserve whitespace and line breaks in a document?
a) <code>
b) <pre>
c) <strong>
d) <b>

30. What does the <u> tag do in HTML?
a) Makes text bold
b) Underlines text
c) Italicizes text
d) Adds a background color


Answer Key:

QnoAnswer
1b) <b>
2b) Makes text italic
3a) <u>
4b) Makes text bold
5c) <em>
6c) <strong>
7b) <sup>
8a) <sub>
9b) <sup>
10a) <sub>
11b) <sup>
12a) <sub>
13b) To format text using fixed-width fonts
14a) White space
15a) <pre>
16b) Displayed in a fixed-width font
17c) Preserving spaces and line breaks
18c) White spaces and line breaks
19a) <b> makes text bold, <strong> emphasizes text
20a) It is used for italicizing text
21b) It underlines the text
22b) Places text above the baseline
23b) To make text subscript
24b) Line breaks and spaces are preserved
25a) To display code
26d) <i> or <em>
27b) Exponents
28c) <sup>
29b) <pre>
30b) Underlines text

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