Span display:block | SoloLearn: Learn to code for FREE!


Span display:block

On the tutorial there are breaks in between each line. But when I run it there are none. <span>line something whatever</span> <span>second line blah blah blah</span> And the css code Span{ display : block; } Can someone tell me why?

9/19/2018 2:31:21 PM


1 Answer

New Answer


That means the text inside the span tag will be behave like a block level Element. After the span tag, text automatically will be go to the next line, in case if you not set the width.