+ 2
What are inline and block-level elements in html?
I have been searching for the definition of this 2 but i cant find them
3 ответов
+ 4
@benji: the link tag is definitely not inline . also // is invalid for html comments.
back to the question:
inline elements (e.g. span-, italic, string-, anchor-tag etc.) don't create a line break while block elements do (e.g. div-, h1-, form-, p-tag, etc.). Also inline elements can be nested inside block elements. But not vice versa. For example:
inline:
<div>This is an <span>inline</span> element nested inside a block element..</div>
block:
<p>This is only one block element.</p>
0
Exemple:
- Inline:
<link href="style.css" type="text/css" />
- Block:
<div class="block">
//some code
</div>
0
Ok @Thanh Cool