Which of the following will correctly display a page header with subtext?

Study for the CodeHS Web Design (Picasso) Test. Prepare with flashcards and interactive multiple choice questions, each question supported by hints and explanations. Ace your exam!

The correct answer displays a page header with subtext using a common coding convention for headers. In this case, the use of the <div class="page-header"> indicates a semantic element designated for page headers, which improves the clarity and organization of the HTML structure. The <h1> element serves as the main title, indicating its importance in the hierarchy of the document. Including <small> within the <h1> tag allows the subtext to be semantically associated with the main header while rendering it in a smaller font size, which is typically suitable for subtitles or additional descriptions.

This structure is beneficial for both design and accessibility, as it simplifies styling and follows best practices for content hierarchy. This approach ensures that the main header and subtext are clearly related, improving user experience and readability within the context of the webpage.

Other choices, while they may also work in some contexts, do not provide the same level of clarity or conformance to common web design standards as the selected answer. For instance, using a simple class like "header" without specifying that it is a page header lacks the specificity that helps in styling and understanding the intended structure.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy