HTML element ũ 2 غ head element ó ȭ鿡 ǥõ element ְ div, p, table... element ó ȭ鿡 ǥõǴ element ֽϴ.
ȭ鿡 ǥõǴ element ٽ зϸ block-level inline-level ֽϴ.
- ȭ鿡 ǥõ ʴ element
- ȭ鿡 ǥõǴ element
block-level inline-level
block-level inline-level ִ ο ֳ Դϴ.
block-level element ο ϳ ġ ֽϴ. ݴ inline-level element ο 2 ̻ .
div(block-level element) span(inline-level element) element ̸ Ȯϰ ֽϴ.
<div style="border:1px gray solid;">block-level element</div> <div style="border:1px gray solid;">block-level element</div> |
block-level element div element 2 Ѷ ϰ ˴ϴ.
ݸ inline-level element ٿ ġ ֽϴ.
<span style="border:1px gray solid;">inline-level element</span> <span style="border:1px gray solid;">inline-level element</span> |
block-level element Ѵٰ ϴ ڽ element ϴ ѵ մϴ. ̺ ȿ ־ ũⰡ ϴ width ϰ ˴ϴ.
<table width="400"> <tr> <td><div style="border:1px gray solid;">block-level element</div></td> <td><div style="border:1px gray solid;">block-level element</div></td> </tr> </table> |
Ÿ ٸ , block-level element inline-level element ݴ Ұմϴ.
ټ κ̶ ϱ block-level inline-level ̸ Ȯϰ ˰ ־ CSS ֽϴ.
block-level elements
- p
- h1~h6
- ul
- ol
- pre
- dl
- div
- noscript
- blockquote
- form
- hr
- table
- fieldset
- address
inline-level elements
- samp
- kbd
- var
- cite
- abbr
- acronym
- a
- img
- object
- br
- script
- map
- q
- sub
- sup
- span
- bdo
- input
- select
- textarea
- label
- button