Inline, Block, Inline-block elements
👉 Inline - An inline element only takes up as much width as necessary.
Here are the inline elements in HTML:
Here are the block-level elements in HTML:
👉 Inline-block -
display: inline-block
allows setting a width and height on the element.display: inline-block
, the top and bottom margins/paddings are respecteddisplay: inline-block
does not add a line-break after the element, so the element can sit next to other elements.CSS Box model
Pseudo class hover, focus, visited, first child, nth child
<style>
Selector:hover {
style-name : style-value;
}
</style>
Pseudo-element before after
<style>
Selector::before{
style-name : style-value;
}
Selector::after{
style-name : style-value;
}
</style>
The position Property
There are five different position values:
static
relative
fixed
absolute
sticky
Follow Us
Were this world an endless plain, and by sailing eastward we could for ever reach new distances