+ 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

6th Jun 2017, 10:19 PM
Basic Coding
Basic Coding - avatar
3 Respuestas
+ 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>
6th Jun 2017, 11:32 PM
Thanh Le
Thanh Le - avatar
0
Exemple: - Inline: <link href="style.css" type="text/css" /> - Block: <div class="block"> //some code </div>
6th Jun 2017, 10:26 PM
BenjiSolo
BenjiSolo - avatar
0
Ok @Thanh Cool
7th Jun 2017, 8:36 AM
BenjiSolo
BenjiSolo - avatar