+ 1
What is inline and block elements in html?
3 Answers
+ 3
a block level is simply one that starts at the new line and takes all width available .<div> is an example . Inline doesnt start on new line and take only necessary space .<span>
<div> example </div> <div> of block <div>
<div>this <span> is inline <span> </div>
output:
example
of block
this is inline
+ 13
Inline elements are basically those that do not require a separate section within the paragraphs or section.
Block level elements are themselves a separate block or section..
U can add a inline element in block level element but cannot do vice versa.
+ 2
inline elements do not end with a line break... but block elements ends with a line break..
block - p, div, h1 etc
inline - a,img