1D0-61B practice question 7 of 15

You are developing a Web site in HTML5. You want the new HTML5 structural elements (such as or ) to be styled consistently in all browsers. You must add a CSS rule that will change them to which element type, to ensure the site will render successfully?

Full set: 55 questions
Answer options
A: Inline
B: Script
C: Fixed
D: Block Correct answer
Correct Answer:
D. Block
Explanation

Older browsers, such as Internet Explorer 8 and earlier, do not recognize new HTML5 structural elements like

,
, and
Why Incorrect

A. Inline: This is the default, problematic rendering behavior in legacy browsers that this CSS rule is intended to fix, not enforce.
B. Script: This is not a valid value for the CSS display property and is unrelated to how elements are rendered for layout purposes.
C. Fixed: This is a value for the CSS position property, which controls an element's position relative to the viewport, not its fundamental box model type (block vs. inline).

References

1. Mozilla Developer Network (MDN) Web Docs: In the guide for using HTML sections, it explicitly recommends this rule for backward compatibility. "For backward compatibility with browsers that do not support HTML5 elements... you can add the following CSS to your stylesheet: section, article, aside, footer, header, nav, hgroup { display: block; }"

Source: MDN Web Docs, Using HTML sections and outlines, "Styling with CSS" section. (developer.mozilla.org/en-US/docs/Web/HTML/Element/section#stylingwithcss)

2. W3C HTML5 Specification (Working Draft 2011): The specification includes a "Suggested rendering" section for user agents, which provides a default stylesheet. For all new structural elements, it recommends display: block. This confirms the intended rendering model.

Source: W3C, HTML5, A vocabulary and associated APIs for HTML and XHTML, Section 10.3.1, "The page". (www.w3.org/TR/2011/WD-html5-20110525/rendering.html#the-page)

3. University of Washington, Paul G. Allen School of Computer Science & Engineering Courseware: In materials for the CSE 154 Web Programming course, the "CSS Cheat Sheet" provides a standard set of rules for HTML5 compatibility, including the display: block rule for all new semantic elements.

Source: University of Washington, CSE 154, CSS Cheat Sheet, "HTML5 Styles" section. (courses.cs.washington.edu/courses/cse154/17au/resources/css-cheat-sheet.html)

Scroll to Top