Multiple choice › CSS (id v class)
CSS (id v class)
1. CSS (id v class)
index.html contains
Software includes code.
. main.css contains body {font-family: Arial;} h1 {font-weight: bold; text-align: center;} .qe_item {font-style: italic; font-weight: bold;}. The developer expected 'Software' to be bold and italic but it looks like regular text. Referring to the code, what is the cause of the problem?- Font family is missing
- Attribute of has not been defined
- main.css has not been correctly referenced
- The id qe_item has not been correctly referenced
Answer
D
The HTML uses an id but the CSS selector .qe_item targets a CLASS (an id selector is #qe_item). Official flag: the NESA MG prints se_item vs qe_item in the question.