Compared to <span>, the <div> element in HTML5 is primarily used for
2024
Compared to <span>, the <div> element in HTML5 is primarily used for
- A.
Adding semantic meaning to content
- B.
Creating block-level elements with distinct sections
- C.
Emphasizing specific text within a paragraph
- D.
Grouping inline elements without affecting layout
Attempted by 87 students.
Show answer & explanation
Correct answer: B
The <div> element is used for creating block-level sections in HTML5. Unlike the inline <span>, it defines distinct content areas that start on a new line.