Questions & 100% Correct Answers | Latest Update 2026
| Exam Prep
1. If you want to create a button with a 10-pixel rounded corner using CSS3,
which code snippet would you use?
button { border-corner: 10px; }
button { border-radius: 10px; }
button { corner-radius: 10px; }
button { round-corner: 10px; }
2. What is the purpose of the autofocus attribute in HTML5 when used with
form elements?
It validates the input of the element.
It styles the element with CSS.
It automatically focuses on the element when the page loads.
It disables the element on page load.
3. Which HTML5 form attribute assists with form completion and validation by
reducing the amount of manual typing a user must do to complete a form?
The autofocus attribute
The autocomplete attribute
The placeholder attribute
The novalidate attribute
4. What value is assigned to the variable 'v1' outside of the function 'f' in the
provided code?
, Green
null
undefined
Blue
5. You need to perform data validation to ensure that the input fields are not
empty and the user's email address and phone numbers have been provided
in the required format. You need to minimize the transmission of information
across the networks. Which of the following coding approaches should you
follow?
Use C# code that executes on the Web server.
Use JavaScript code that executes in the browser.
Use JavaScript code that executes on the Web server.
User C# code that executes in the browser.
6. 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
7. HTML5 APIs can be used to:
determine how to display HTML elements in your Web pages.
provide a development environment that enables the seamless use of
proprietary browser plug-ins.
, create apps for mobile devices.
call another location in the Web page or a separate Web page when
the API is selected.
8. If you were developing a travel application, how would you utilize the HTML5
Geolocation API to enhance its functionality?
By using the API to validate user login credentials.
By using the API to automatically detect the user's current location
and suggest nearby attractions.
By using the API to create a database of user preferences.
By using the API to change the color scheme of the application.
9. In HTML5, which tag contains a list of pre-defined options?
List
Select
Datalist
Option
10. Which statement about modern Web design is true?
The design of mobile Web pages requires no differences from pages
designed for desktop computers.
Web developers must specialize in designing for either desktop or
mobile devices, but not both.
The basic language and procedures for creating Web pages is
completely different for mobile and desktop design.
The design of mobile Web pages requires some differences from
pages designed for desktop computers.
, 11. Describe the structure of a CSS rule and identify its main components using
the example 'body {color: #008080;}'.
A CSS rule is only about colors and does not include other styles.
A CSS rule only contains properties without selectors.
A CSS rule is defined by HTML elements only.
A CSS rule consists of a selector and a declaration block, where
'body' is the selector and 'color: #008080;' is the declaration.
12. What does the CSS3 h3 ~ p selector specifically target in an HTML
document?
It targets all <h3> elements within <p> elements.
It targets only the first <p> element following an <h3> element.
It targets all <p> elements that are siblings of an <h3> element.
It targets all <h3> elements in the document.
13. Consider the following code:
<script type="text/javascript">
var day = "Thursday";
if(day < "Wednesday")
{window.alert("It's before today");}
else{window.alert("It's after today");}
</script>
What is the result when this script is run in the browser?
The window alert box will display: It's before today
The window alert box will error because you cannot perform a
Boolean operation on a string.
The window alert box will display: It's before today, then after the
user clicks OK it will display: It's after today.