Questions: You can use line returns, tabs, and spaces to align your HTML code as long as they're within tags because whitespace is ignored by browsers

You can use line returns, tabs, and spaces to align your HTML code
as long as they're within tags
because whitespace is ignored by browsers
Transcript text: You can use line returns, tabs, and spaces to align your HTML code as long as they're within tags because whitespace is ignored by browsers
failed

Solution

failed
failed

The answer is the first one: you can use line returns, tabs, and spaces to align your HTML code as long as they're within tags because whitespace is ignored by browsers.

Explanation for each option:

  1. The first one: This is correct. In HTML, whitespace such as spaces, tabs, and line returns are generally ignored by browsers when rendering the page. This means you can use them to format your HTML code for better readability without affecting how the page is displayed.

  2. As long as they're preceded by dashes: This is incorrect. Whitespace does not need to be preceded by dashes to be ignored. Dashes are not related to how whitespace is treated in HTML.

  3. Because comments are ignored by browsers: This is incorrect in the context of the question. While it is true that comments are ignored by browsers, the question is about using whitespace for alignment, not about comments. Comments in HTML are enclosed within <!-- and --> and are indeed ignored by browsers, but this is unrelated to the use of whitespace for code alignment.

In summary, the correct understanding is that whitespace within HTML tags is ignored by browsers, allowing developers to format their code for readability without affecting the display.

Was this solution helpful?
failed
Unhelpful
failed
Helpful