Web Development MCQs

100 MCQs  (Page 1 of 10)

Practice Web Development MCQs with correct answers and explanations. Browse subtopics below or start a practice quiz.

What is the correct HTML5 DOCTYPE declaration?
<!DOCTYPE html5>
<html5>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!DOCTYPE html>
What is the difference between <b> and <strong>?
They are identical in every way
<strong> is deprecated
<b> is semantic; <strong> is stylistic
<strong> marks important content semantically; <b> is purely stylistic boldness
Which statement about HTML form methods is correct?
POST data appears in the URL
GET can send unlimited data
GET appends the form data to the URL (visible and bookmarkable); POST sends it in the request body
GET is encrypted; POST is not
<input type="email" required> validates input in the browser. Is server-side validation still needed?
Only for numbers
Only on Internet Explorer
No, the browser guarantees valid data
Yes; client-side validation can be bypassed easily, so the server must always validate
How is a <label> correctly associated with an input?
With <label class="temp">
Labels cannot be linked to inputs
With <label for="temp"> matching <input id="temp">
With <label name="temp">
Which meta tag is essential for responsive pages on mobile devices?
<meta charset="mobile">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="responsive" content="true">
<meta name="mobile" content="yes">
Which statement about id and class attributes is correct?
An id must be unique in the document; a class can be shared by many elements
Both must be unique
A class must be unique
An id can be repeated freely