Day 19: inline and block level elements. 1, 2.

 <!DOCTYPE html>

<html>

<body>

<p style="border: 1px solid black">Hello World</p>

<div style="border: 1px solid black">Hello World</div>

<p>The P and the DIV elements are both block elements, and they will always start on a new line and take up the full width available (stretches out to the left and right as far as it can).</p>

</body>

</html>

-----------------------------------------------------------------------------------------------------------------------------

p{

display: inline;

}

strong{
display: block;
}


Comments

Popular posts from this blog

else-if condition in if-else statements: Concatenation in JavaScript :

Day 9: CSS - Font Formate

Day 28: CSS Animation, CSS Transition Animation Box size