Block&Inline
<!DOCTYPE html>
<html>
<body>
<!-- ex1 -->
<!-- <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>
<p>
This is an inline span
<span style="border: 1px solid black">Hello World</span> element inside a
paragraph.
</p>
<p>
The SPAN element is an inline element, and will not start on a new line
and only takes up as much width as necessary.
</p> -->
<!-- ex2 -->
<!-- <div style="background-color: black; color: white; padding: 20px">
<h2>London</h2>
<p>
London is the capital city of England. It is the most populous city in
the United Kingdom, with a metropolitan area of over 13 million
inhabitants.
</p>
<p>
Standing on the River Thames, London has been a major settlement for two
millennia, its history going back to its founding by the Romans, who
named it Londinium.
</p>
</div>
<p>
My mother has
<span style="color: blue; font-weight: bold">blue</span> eyes and my
father has
<span style="color: darkolivegreen; font-weight: bold">dark green</span>
eyes.
</p> -->
</body>
</html>
'HTML' 카테고리의 다른 글
Id (0) | 2023.02.01 |
---|---|
Class (0) | 2023.02.01 |
Lists (0) | 2023.02.01 |
TableColgroup (0) | 2023.02.01 |
TableStyling (0) | 2023.02.01 |