Q1. You develop an HTML5 webpage. You have the following HTML markup:
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
Q2. You are developing a web page. You create a grid layout by using the following CSS segment.
You have the following requirements:
. You must place content in the first column of the second row.
. The content must span two columns.
You need to ensure that the style of the grid meets the requirements.
Which CSS segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Q3. You develop an HTML application that contains a table that displays a list of products. The table is defined with the following HTML markup:
You need to implement the CSS selectors to select the rows that must have a blue background.
Which CSS selector should you use?
A. thead:only-child, tbody:after, table:before
B. tr [line |-0, 1, 3]
C. tr:first-of-type, tr:last-of-type
D. tr:first-line, tr:last-child
Answer: B
Q4. You are developing an application that processes order information. Thousands of orders are processed daily. The application includes the following code segment. (Line numbers are included for reference only.)
The application must:
. Display the number of orders processed and the number of orders remaining . Update the display for every 25th record processed
You need to develop the application to meet these requirements.
Which line of code should you insert at line 04?
A. if (!(counter % 25))
B. if (counter == 25)
C. if (counter >> 25 == 0)
D. if (counter >> 25 == 0)
Answer: A
Q5. Your company uses a third-party component that generates HTML for a website. The third-party component creates DIV elements that display a yellow background.
The third-party component uses inline styles in the DIV elements that are inconsistent with your corporate standards. You must override the DIV elements in the style sheet with the corporate styles.
You need to ensure that the website meets corporate standards.
Which style should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Q6. You are creating a JavaScript function that displays the name of a web application.
You declare the following button element.
<input type="button" id= "About" value="About" />
When a user clicks the button, a JavaScript function named About must be called.
You need to create an event handler that calls the About function when the button is clicked.
Which two code segments can you use? (Each correct answer presents a complete solution. Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: CD
Q7. You are developing a JavaScript library.
You have the following requirements:
Custom exceptions must include an error message and custom error number. These exceptions must be thrown when data validation errors occur. Developers must call the library to easily catch the exception and identify the problem.
You develop the following code. (Line numbers are included for reference only.)
You need to complete the code to meet the requirements.
Which line of code should you insert at line 09?
A. throw new Validatior.Exception (123, "Day of week must be les3 than 7");
B. return new ValidationException(123, "Day of week must be less than 7");
C. throw ValidationException(123, "Day of week must be less than 7");
D. catch ValidationException(123, "Day of week: must be less than 7");
Answer: A
Q8. You are developing an HTML5 page named main.html. The JavaScript code for the main page is located in a file named myApp.js.
You need to create a web worker and instantiate it from main.html.
Where should you place the web worker code?
A. In the myApp.js file
B. In the main.html file
C. In a separate .js (JavaScript) file
D. In a separate executable file
Answer: C
Q9. You are developing a web page by using HTML5 and C5S3. The page includes a <div> tag with the ID set to validate.
When the page is rendered, the contents of the <div> tag appear on a line separate from the content above and below it. The rendered page resembles the following graphic.
You need to ensure that the page is rendered to meet the requirement.
Which line of code should you use?
A. document.getElementById("validate").style.display = "inline";
B. document.getElementById("validate").style.margin = "0";
C. document.getElementById("validate").style.padding = "0";
D. document.getElementSyId("validate").style.display = "block";
Answer: A
Q10. You are modifying a website. The body of the page will be divided into two sections: . A content section will contain blog posts and comments. . An area on the right-hand side will contain advertisements. The page is defined by the following HTML.
The site must conform to HTML5 standards and must use HTML5 semantic tags. You need to ensure that the advertisements are on the rightmost section of the page. Which tag should you use?
A. <aside>
B. <div>
C. <article>
D. <footer>
Answer: A