Proper indentation means child elements are indented inside their parent tags. Option A correctly indents the
and
inside
<!DOCTYPE html> <html> <head> <title>Test</title> </head> <body> <h1>Hello</h1> <p>Paragraph</p> </body> </html>
HTML ignores indentation spaces when rendering. So even if indentation is inconsistent, the browser shows all elements normally. Option B is correct.
body {
background: white;
}
nav ul li {
color: blue;
}
#main-content {
font-size: 1.2rem;
}
.container > p {
margin: 1rem;
}The selector #main-content uses an ID, which has higher specificity than element selectors like body or nav ul li, or class selectors like .container > p. Indentation does not affect specificity.
Option C uses consistent 4-space indentation for all properties inside the selector blocks, making it easy to read and maintain. Other options have inconsistent or excessive indentation.
Screen readers use semantic HTML tags and attributes to understand content, not indentation or whitespace. Proper indentation helps developers read code but does not affect screen reader behavior.