Latest Update 2026 | Complete Question Bank | Study Guide PDF
1. Which selector only applies to the <p> element that immediately follows an
<h1> element?
h1+p {}
h1 p {}
h1 > p {}
2. Which HTML5 form element should you use to specify a list of pre-defined
choices for an input element?
The select element
The datalist element
The output element
The inputlist element
3. If you want to display a welcome message to users when they visit your site,
how would you implement this using JavaScript?
By using the prompt() method to ask the user for their name before
displaying the message.
By calling the alert() method with a welcome message as an
argument.
By using the console.log() method to print the message in the browser
console.
By creating a new HTML element to display the message on the page.
4. What is a characteristic of global variables in JavaScript?
, They can be accessed from any function within the same scope.
They cannot be modified once declared.
They can only be accessed within the function they are declared.
They are automatically deleted after the function execution.
5. If a website is not displaying correctly on mobile devices, which CSS
technique should a developer check to ensure styles are applied
appropriately?
Media queries
HTML5 semantic elements
CSS resets
JavaScript functions
6. In the CSS rule 'body {color: #008080;}', what is the property being set?
declaration
body
color
#008080
7. What is the term for a type of user input validation in which the user input in
each field of a form is validated as the user completes it, before the form is
submitted?
Graceful degradation
Embedded validation
Pogo-sticking
Inline validation
,8. Describe the importance of knowing the browser support status for HTML5
and CSS3.
Browser support is only important for JavaScript.
Browser support is irrelevant for modern web development.
Browser support only affects the design of a website.
Understanding browser support helps developers ensure their web
applications function correctly across different browsers.
9. Describe how the HTML5 Geolocation API enhances user experience in web
applications.
The HTML5 Geolocation API allows web applications to provide
location-based services, improving user experience by
personalizing content and functionality.
The HTML5 Geolocation API is primarily for form validation.
The HTML5 Geolocation API enables users to upload files to the
server.
The HTML5 Geolocation API is used to style web pages with CSS.
10. What type of website could adapt to the multiple devices (PC, mobile, and
tablet) that a user incorporates in their daily shopping habits?
open source design
universal access design
transformational web design
responsive web design
, 11. If a web designer wants to create a layout that adapts to different screen
sizes using percentage values, which layout method should they implement?
Responsive layout
Absolute layout
Fixed layout
Fluid layout
12. If a JavaScript application fails to load an external script, how would you
implement an onerror event handler to notify the user?
By removing the script tag from the document.
By adding an onerror attribute to the script tag that displays an
alert message.
By logging the error to the console without notifying the user.
By using a try-catch block around the script loading code.
13. What is the common term for the type of form used for user authentication
on websites?
Feedback form
Login form
Registration form
Contact form
14. What is the term used to describe applications specifically designed for
mobile devices?
Desktop app
Mobile app