← BYTES
HTML·Starter·Ref: 2.1.3

What is the key difference between `<div>` and `<span>`?

Have a question about this video? Mention reference 2.1.3 when you contact us.

a.They are functionally identical
b.`<span>` can only contain images
c.`<div>` is a block-level element (starts on a new line, takes full width); `<span>` is an inline element (flows within surrounding text, only as wide as its content)
d.`<div>` cannot be styled with CSS
Both are generic, semantically-neutral containers, but <div> defaults to block-level display (stacking vertically, full available width) while <span> defaults to inline display (sitting within a line of text, sized to its content).

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES213#HTML