2026 | Verified Q&A | Exam Success Guide | Download PDF
1. Describe the role of a selector in the context of CSS styling.
A selector is used to link CSS to HTML documents.
A selector identifies which HTML elements will be affected by the
CSS rules.
A selector is a JavaScript function for handling events.
A selector defines the color scheme of a webpage.
2. What is the purpose of the CSS @keyframes rule?
To add visual effects to an element
To specify the background color of an element
To control the positioning of an element
To define a CSS animation
3. What is the purpose of the CSS transform-origin property?
To specify the font family for text
To specify the origin point of a CSS transform effect
To control the visibility of an element
To create a 3D perspective for an element
4. What is the primary purpose of the legend element in HTML?
To style the appearance of form elements.
To create a new section within a form.
, To add a caption for the group of items created by the fieldset.
To define a list of options in a dropdown.
5. If a web developer wants to ensure that a username input field does not
exceed 15 characters, which attribute should they use and how would it be
implemented in HTML?
Use the minlength attribute set to 15 in the input tag.
Use the pattern attribute to restrict input to 15 characters.
Use the maxlength attribute set to 15 in the input tag.
Use the size attribute set to 15 in the input tag.
6. Which CSS3 technique can you use to place an HTML element on top of
another HTML element?
Formation
Overlay
Overflow
Box-sizing
7. If a web developer wants to allow users to select a value between 0 and 100
with a visual slider, which HTML5 input type should they use?
Color
Number
Range
Text
,8. Describe the rules for naming variables in JavaScript, particularly focusing on
the characters allowed after the first character.
After the first character, a JavaScript variable name can include
letters, numbers, or underscores (_).
Variable names can include any character after the first character.
After the first character, only letters are allowed.
Only numbers and underscores are allowed after the first character.
9. Which History API method changes the URL in the browser window by
adding a URL to the history stack?
history.changeState()
history.pullState()
history.pushState()
history.replaceState()
10. If a web developer wants to include a button that submits data to multiple
forms on a page, how should they utilize the form attribute?
They should create separate buttons for each form to avoid
confusion.
They should place the button inside each form to ensure it submits
data correctly.
They should use JavaScript to manually submit each form when the
button is clicked.
They should assign the form attribute to the button, specifying the
IDs of the forms it should submit data to.
, 11. In a web application, if you want to validate a user's input when they leave a
text field, which event would you use and why?
The 'focus' event, because it triggers when the user clicks on the text
field.
The 'blur' event, because it triggers when the user removes focus
from the text field, allowing for input validation.
The 'change' event, because it triggers when the input value changes.
The 'submit' event, because it triggers when the form is submitted.
12. Describe how the 'transform-origin' property affects the transformation of an
element in CSS3.
The 'transform-origin' property sets the color of the element's border.
The 'transform-origin' property specifies the size of the element.
The 'transform-origin' property determines the point around which
a transformation is applied, affecting the element's position during
the transformation.
The 'transform-origin' property controls the visibility of an element.
13. Which event is triggered when a field loses the focus?
onblur
onunfocus
onkeyup
onmouseout
14. If a developer wants to allow users to submit a form without any validation
checks, which attribute should they include in the form tag?