Programming in HTML5 with JavaScript and CSS3 — Question 29

You develop an HTML5 webpage with custom CSS. You have the following HTML markup:
<div class="new" Item">...</div>
You have the following requirements:
✑ In addition to your CSS, you must use a corporate branded stylesheet named corporate.css.
✑ The corporate.css file contains the style rule that must be used for .newsItem.
✑ You must use the corporate.css file to ensure that the webpage changes when the brand changes.
✑ You must add additional style rules to the webpage.
✑ You cannot modify the corporate.css file.
You need to apply the appropriate CSS rules to meet the requirements.
What should you do?

Answer options

Correct answer: D

Explanation

The correct answer is D because it allows you to use the existing corporate styles while ensuring your additional rules take precedence without altering the corporate.css file. Options A and C introduce new classes that do not utilize the required corporate styles, and option B suggests modifying the corporate file, which is against the requirements.