0% found this document useful (0 votes)
12 views3 pages

HTML Test

This document is a weekly test consisting of 20 advanced multiple-choice questions on HTML. Each question tests knowledge on various HTML elements, attributes, and best practices. The test covers topics like document structure, semantic tags, form handling, and browser compatibility.

Uploaded by

detailalex35
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

HTML Test

This document is a weekly test consisting of 20 advanced multiple-choice questions on HTML. Each question tests knowledge on various HTML elements, attributes, and best practices. The test covers topics like document structure, semantic tags, form handling, and browser compatibility.

Uploaded by

detailalex35
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

HTML Weekly Test – Advanced MCQs (20

Questions)

Instructions: Choose the correct option. Each carries 1 mark.

1. Which of the following statements about <!DOCTYPE html> is TRUE?


a) It is mandatory in HTML4 but optional in HTML5
b) It tells the browser which version of HTML to expect
c) It enables browser compatibility mode
d) It affects SEO ranking

2. What happens if you include multiple <title> tags inside <head>?


a) Both titles will be displayed in browser tab
b) Only the first one is used
c) Only the last one is used
d) Browser will throw an error

3. Which HTML element improves accessibility for screen readers in a navigation menu?
a) <ul>
b) <div>
c) <nav>
d) <section>

4. Which is NOT true about <meta charset="UTF-8">?


a) It supports multilingual content
b) It avoids character encoding issues
c) It improves page ranking in Google
d) It enables emojis

5. Which of the following tags is considered deprecated in HTML5?


a) <i>
b) <b>
c) <center>
d) <em>

6. Which input type provides a range slider?


a) <input type="range">
b) <input type="slider">
c) <input type="scale">
d) <input type="bar">

7. If you don’t specify a method in a <form>, what will happen?


a) The form won’t submit
b) It defaults to POST
c) It defaults to GET
d) Browser asks the user to choose

8. Which of these is a void element (self-closing)?


a) <textarea>
b) <input>
c) <iframe>
d) <select>
9. Which HTML5 element represents self-contained content (like a blog post)?
a) <section>
b) <article>
c) <aside>
d) <div>

10. Which attribute is NOT valid in <iframe>?


a) src
b) sandbox
c) allowfullscreen
d) charset

11. Which HTML element provides a machine-readable date/time format?


a) <time>
b) <datetime>
c) <date>
d) <clock>

12. Which of the following is TRUE about <link rel="stylesheet" href="style.css">?


a) It must always be placed before <title>
b) It is mandatory to mention type="text/css" in HTML5
c) It is an empty (void) element
d) It loads synchronously like <script>

13. Which of the following is NOT a semantic tag?


a) <header>
b) <mark>
c) <main>
d) <span>

14. Which attribute in forms helps mobile browsers show numeric keyboards?
a) <input type="text" keyboard="numeric">
b) <input type="number">
c) <input type="digit">
d) <input type="mobile">

15. Which of the following is NOT valid nesting in HTML?


a) <p><em>Text</em></p>
b) <a><div>Content</div></a>
c) <ul><li>Item</li></ul>
d) <section><article>Post</article></section>

16. Which element is used for marking up contact information?


a) <info>
b) <address>
c) <cite>
d) <footer>

17. Which attribute in <script> improves performance by deferring execution until the DOM is
ready?
a) async
b) defer
c) lazy
d) wait

18. Which is TRUE about <strong> and <em> tags?


a) Both are purely visual, no semantic meaning
b) <strong> implies importance, <em> implies emphasis
c) <strong> is replaced by <b> in HTML5
d) <em> is replaced by <i> in HTML5

19. Which HTML5 feature allows browsers to store data locally without expiration?
a) Cookies
b) localStorage
c) sessionStorage
d) WebSQL

20. Which of the following is NOT correct about <base href="https://example.com/">?


a) It changes the default URL for all relative links
b) Only one <base> tag can exist per page
c) It can change the target of all hyperlinks
d) It affects absolute URLs

You might also like