Western Governors University (WGU) ITSW2120 D276 Practice Exam

Session length

1 / 20

Which code snippet captures the text "I love you" with "love" in bold?

<p>I <strong>love</strong> you</p>

The code snippet that captures the text "I love you" with "love" in bold is correct because it uses the `<strong>` element to create bold text. In HTML, the `<strong>` tag is specifically designed to define text of strong importance, and browsers typically render this text in a bold font to indicate emphasis.

This is typically used in written content to highlight key points or important phrases within a paragraph. The surrounding `<p>` tags indicate that this is a paragraph, providing proper semantic structure to the HTML document. Thus, when rendered on a webpage, the text "I love you" will appear with "love" in bold, achieving the desired visual effect.

The other choices do not accomplish the same effect: using `<em>` denotes emphasized text often rendered in italics; `<h1>` is intended for headings and does not provide strictly bold styling as part of a paragraph; and `<span>` is a generic inline container that does not apply any default styling, so it would render as regular text without any bold effect.

<p>I <em>love</em> you</p>

<p>I <h1>love</h1> you</p>

<p>I <span>love</span> you</p>

Next Question
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy