Aller au contenu

1NSI : CSS -> DISPLAY⚓︎

When you create an element to display on the page, it renders as a box & we have seen how to position those boxes on the page, but there’s more we can do with them. CSS’s Display property specifies the type of rendering box that is created from our HTML. Let’s check out some of the different display styles we can use.

BLOCK — Element starts on a new line & takes up the entire width. May contain other block or inline elements. Elements that are block-level by default include

,

,

-

,
    ,
  • , & .

    INLINE —Element can start anywhere on an existing line. Height and width properties have no effect. Elements that are inline by default include , ,