Q1. You are developing an application that uses a third-party JavaScript library named doWork().
The library occasionally throws an "object is null or undefined" error with an error code of -2146823281.
The application must:
. Extract and handle the exceptions thrown by doWork()
. Continue normal program execution if other exceptions occur You need to implement the requirements.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Q2. 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
Q3. You develop an HTML5 webpage. You have the following HTML markup:
You need to change the background color for all of the elements whose name attribute ends with the word name.
Which code segment should you add to the webpage?
A. $ ('#name').css ({ 'background-color' : '#E0ECF8' });
B. $ ('input [name |="name"; ] ' ) .css (( 'background-color' : '#E0ECF8'});
C. $('input[name$="name"]'). css{{'background-color' : '#E0ECF8'});
D. $ ('*name' ) .css ({ 'background-color' : ' #E0ECF8'}) ;
Answer: C
Q4. You are developing an HTML5 web application and are styling text. You need to use the text-transform CSS property.
Which value is valid for the text-transform property?
A. red
B. hidden
C. lowercase
D. italic
Answer: C
Q5. You are modifying a blog site to improve search engine readability.
You need to group relevant page content together to maximize search engine readability.
Which tag should you use?
A. <section>
B. <tbody>
C. <div>
D. <table>
Answer: A
Q6. You are creating a JavaScript object that represents an employee.
You need to extend the Employee object by adding the GetPayroll() method.
You need to ensure that all future instances of the Employee object implement the GetPayroll() method.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
Q7. You troubleshoot a webpage that contains the following HTML markup: (Line numbers are included for reference only.)
The webpage also contains the following JavaScript function named someEvent() that is declared in the HEAD section of the HTML:
Function someEvent() { Alert('someEvent fired!'); }
The JavaScript function named someEvent() must run only when the user clicks the DIV element, not the INPUT elements.
You need to modify the webpage to invoke the JavaScript function named someEvent().
What should you do? (Each correct answer presents a complete solution. Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: AB
Q8. You are implementing an application by using HTML5 and JavaScript. A web page contains the following HTML table.
The application must:
. Identify all rows in the table body that have a class attribute of selected
. Exclude the last selected row in the table
You need to implement the web page according to the requirements.
Which CSS selector should you use?
A. tr:not(tr:last-child).selected < #dataTable
B. #dataTable > tr.selected:not(tr:last-child)
C. #dataTable tbody tr.selected:not(tr:last-child)
D. #dataTable tr.selected:not(tr:last-child)
Answer: C
Q9. You develop an HTML5 webpage. You have the following HTML markup: (Line numbers are for reference only.)
You need to determine how the webpage will appear when the CSS styles are applied.
Select two.
A. The first row of the table will have a red background.
B. The second row of the table will have a red background.
C. The second cell in the first row of the table will have a blue background.
D. The second cell in the third row of the table will have a blue background.
E. The second cell in the third row of the table will have not have blue background.
Answer: AE
Q10. 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