HTML/CSS MCQs – Multiple Choice Questions and Answers – Part 3
Multiple choice questions and answers (MCQs) on HTML/CSS to prepare for exams, tests, and certifications. These questions are taken from a real written exam and some parts are taken from an interview. So you will find questions on basic techniques such as tags, web standards, CSS selector, objects, and more. This quiz will easily prepare anyone to pass their online test.
1. Which tag is used to display pre-formatted text?
A <pre> … </pre>
B <prefor> … </prefor>
C <p> … </p>
D <pre-format> … </pre-format>
2. How to add alternative text to an image?
A <img src = “https://stackhowto.com/logo.png” alternate = “logo” />
B <img src = “https://stackhowto.com/logo.png” alt text = “logo” />
C <img src = “https://stackhowto.com/logo.png” alternate text = “logo” />
D <img src = “https://stackhowto.com/logo.png” alt = “logo” />
[st_adsense]
3. How to embed audio files in HTML?
A <embed src = “audio.mp3” width = “50” height = “10”>
B <embed sound = “audio.mp3” width = “50” height = “10”>
C <embed audio = “audio.mp3” width = “50” height = “10”>
D <embed music = “audio.mp3” width = “50” height = “10”>
4. In HTML, Uniform Resource Locator (URL) is used _____
A To create a frame document.
B To create an image map in a web page.
C To customize the image in a web page.
D To identify a name or a resource on the Internet.
5. CSS is an acronym for _____
A Cascading Style Sheet
B Costume Style Sheet
C Cascading System Style
D None of the above
[st_adsense]
6. Which of the following protocols is not used on the Internet?
A Gopher
B HTTP
C WIRL
D Telnet
7. What should be the value of the “width” property of the following table: (<table style="width:'???'">
), to make the width of the table fit the current width of the browser window?
A 100%
B 640px
C 100em
D 1024px
8. Which element is used in <HEAD> of an HTML/XHTML page, if we want to use an external CSS to decorate the page?
A <src>
B <link>
C <style>
D <css>
<link rel="stylesheet" type="text/css" href="style.css">
[st_adsense]
9. What attribute can be added to many HTML/XHTML elements to identify them as a member of a specific group?
A Id
B class
C div
D span
<html> <head> <style> .city { background-color: blue; color: yellow; } </style> </head> <body> <p class="city">London is the capital of England.</p> <p class="city">Paris is the capital of France.</p> <p class="city">Tokyo is the capital of Japan.</p> <p class="city">Rabat is the capital of Morocco.</p> </body> </html>
10. When we write <img src = "img.png">
, what does “img.png” imply?
A element
B attribute
C value
D operator