TECH

Html block and inline elements

AKA.DM 2022. 3. 11. 12:28
반응형

every html elemnt has a default display value, depending on what type of element it is.

 

there are two display values : block and inline.

 

block level elements

adress

article

aside

blockquote 

canvas

dd

div 

dl

dt

fieldset

figcaption

figure

footer

form

h1~h6

header

hr

li

main

nav

noscript

ol

p

pre

section

table

tfoot

ul

video

 

inline elements

a

abbr

acronym

b

bdo

big

br

butoon

cite

code

dfn

em

i

img

input

kdb

label

map

object

output

time

tt

var

 

 

Chapter Summary

there are two display values : block and inline

a block-level element always starts on a new line and takes up the full with available

an inline element does not start on a new line and it only takes up as much width as necessary

the <div> element is a block-level and its often used as a contaioner for other HTML elements

the <span> element is an inline container used to mark up a part of a text, or a part of a document

반응형