Please note that these are sample papers that we use to revise before getting into the D276 Objective assessment. It is not a guarantee that after you review them you will pass, but there is a very high chance that you will do.
If you do not want to risk failing do not hesitate to reach us out, we can take the OA for you and you are assured of passing. We wish you all the best as you revise
Section 1: HTML Fundamentals and Structure (15 Questions)
- Question: What is the fundamental purpose of HTML?
- Answer: HTML (Hypertext Markup Language) is used to create the structure and content of a web page using elements and tags.
- Question: What is the difference between an HTML element and an HTML tag?
- Answer: A tag is the opening or closing code, like
<h1>. An element is the complete component, including the opening tag, closing tag, and all the content in between.
- Answer: A tag is the opening or closing code, like
- Question: What is the purpose of a semantic HTML element?
- Answer: It provides a clear meaning about the content it contains to both the browser and the developer, such as
<header>,<nav>, and<footer>.
- Answer: It provides a clear meaning about the content it contains to both the browser and the developer, such as
- Question: What is the correct HTML tag to create a hyperlink, and what attribute is required?
- Answer: The
<a>tag is used to create a hyperlink, and thehrefattribute is required to specify the destination URL.
- Answer: The
- Question: What is the purpose of the
altattribute in an<img>tag?- Answer: The
alt(alternative text) attribute provides a text description of the image for accessibility (screen readers) and when the image fails to load.
- Answer: The
- Question: How do you create an unordered list in HTML?
- Answer: An unordered list is created using the
<ul>tag, with each list item defined by the<li>tag.
- Answer: An unordered list is created using the
- Question: What is the difference between a
<div>and a<span>element?- Answer: A
<div>is a block-level element (starts on a new line and takes up full width), while a<span>is an inline element (does not start on a new line).
- Answer: A
- Question: What is the purpose of an HTML form?
- Answer: An HTML form is used to collect user input via various input fields (like text boxes and buttons) and submit that data to a server.
- Question: What is the purpose of the
<!DOCTYPE html>declaration?- Answer: This declaration tells the web browser which version of HTML the document is written in, ensuring the page renders correctly.
- Question: Where in the HTML document should you link to an external CSS file?
- Answer: You should link to a CSS file using the
<link>tag within the<head>section of the HTML document.
- Answer: You should link to a CSS file using the
- Question: What is the purpose of an HTML attribute?
- Answer: An attribute provides additional information about an element, such as its source (
src), destination (href), or class (class).
- Answer: An attribute provides additional information about an element, such as its source (
- Question: What HTML tag is used to define a cell in a table?
- Answer: The
<td>(table data) tag is used to define a standard cell in a table.
- Answer: The
- Question: How do you make text bold in HTML?
- Answer: You can use the
<strong>tag to indicate strong importance or the<b>tag for simple bolding.
- Answer: You can use the
- Question: What is the purpose of the
<head>section of an HTML document?- Answer: The
<head>section contains metadata about the document, such as the title, links to stylesheets, and scripts, which is not displayed on the page.
- Answer: The
- Question: What is the correct way to add a single-line comment in HTML?
- Answer: An HTML comment starts with “.
Section 2: CSS Fundamentals and Layout (15 Questions)
- Question: What is the primary role of CSS?
- Answer: CSS (Cascading Style Sheets) is used to control the visual presentation and layout of a web page’s content, including colors, fonts, and spacing.
- Question: What is the difference between an ID selector and a class selector?
- Answer: An ID selector (
#id-name) is used to style a single, unique element. A class selector (.class-name) can be applied to multiple elements.
- Answer: An ID selector (
- Question: What is the CSS Box Model?
- Answer: The CSS Box Model describes how every element is rendered as a rectangular box with four layers: content, padding, border, and margin.
- Question: What does the
paddingproperty do in CSS?- Answer: The
paddingproperty defines the space between an element’s content and its border.
- Answer: The
- Question: How do you change the background color of an element in CSS?
- Answer: You use the
background-colorproperty. For example,background-color: blue;.
- Answer: You use the
- Question: What does the
display: flex;property do?- Answer: It turns an element into a flex container, allowing for the flexible arrangement of its child elements along a single axis.
- Question: What is the purpose of a CSS media query?
- Answer: A media query is a CSS technique that allows you to apply different styles based on the characteristics of the user’s device, such as screen size or orientation. This is key for responsive design.
- Question: What is a common way to link an external CSS file to an HTML document?
- Answer: Using the
<link rel="stylesheet" href="styles.css">tag.
- Answer: Using the
- Question: What is the purpose of the
z-indexproperty?- Answer: The
z-indexproperty specifies the stack order of an element, determining whether it appears in front of or behind other elements.
- Answer: The
- Question: What is the difference between a margin and a border?
- Answer: A margin is the transparent space outside an element’s border, separating it from other elements. The border is a visible line that surrounds the padding and content.
- Question: What does the
position: absolute;property do?- Answer: It removes an element from the normal document flow and positions it relative to its closest positioned ancestor.
- Question: How do you add a comment in a CSS file?
- Answer: You can add comments using the syntax
/* This is a comment */.
- Answer: You can add comments using the syntax
- Question: What is the purpose of the
vhandvwunits in CSS?- Answer:
vh(viewport height) andvw(viewport width) are units that are relative to the size of the browser’s viewport.
- Answer:
- Question: What is the cascade in Cascading Style Sheets?
- Answer: The cascade is the algorithm that determines which CSS rules apply to an element when multiple rules conflict. It is based on a hierarchy of specificity, inheritance, and order.
- Question: What does
display: grid;do?- Answer: It creates a two-dimensional layout system with rows and columns, allowing for more complex grid-based designs.
Section 3: JavaScript and Web Concepts (15 Questions)
- Question: What is the purpose of JavaScript?
- Answer: JavaScript is a programming language that allows you to create dynamic and interactive effects on a web page.
- Question: What is the difference between the let and const variable declarations in JavaScript?* Answer: A variable declared with let can be reassigned, while a variable declared with const cannot be.
- Question: How do you select an HTML element by its ID in JavaScript?
- Answer: You use the
document.getElementById()method.
- Answer: You use the
- Question: What does the acronym DOM stand for?
- Answer: DOM stands for Document Object Model, which is a programming interface for HTML and XML documents.
- Question: What is a JavaScript callback function?
- Answer: A callback is a function that is passed as an argument to another function and is executed after the outer function has completed or at a specific time.
- Question: What is an event in JavaScript?
- Answer: An event is an action that occurs on a web page, such as a user clicking a button, a page loading, or a form being submitted.
- Question: What does the
console.log()method do?- Answer: It writes a message to the browser’s console for debugging and testing purposes.
- Question: What is the purpose of an
if...elsestatement?- Answer: It allows you to execute one block of code if a specified condition is true and a different block if it is false.
- Question: What is the difference between a front-end and a back-end developer?
- Answer: A front-end developer works on the user-facing part of the website (HTML, CSS, JavaScript). A back-end developer works on the server-side logic and databases (Node.js, Python, etc.).
- Question: What is HTTP, and what is the difference between it and HTTPS?
- Answer: HTTP (Hypertext Transfer Protocol) is the protocol used to transfer data over the web. HTTPS is the secure version, using encryption to protect data.
- Question: What does the
innerHTMLproperty do?- Answer: It gets or sets the HTML content inside an element.
- Question: What is the purpose of an array in JavaScript?
- Answer: An array is a data structure used to store a collection of multiple items in a single variable.
- Question: How do you add a comment in JavaScript?
- Answer: You can use
//for a single-line comment or/* ... */for a multi-line comment.
- Answer: You can use
- Question: What does a
scripttag with theasyncattribute do?- Answer: It tells the browser to download the script asynchronously while the HTML document is still parsing and to execute it as soon as it’s downloaded.
- Question: What is the purpose of the
returnkeyword in a JavaScript function?- Answer: The
returnkeyword is used to stop the execution of a function and return a value from that function.
- Answer: The