CSS Block Property
CSS Block Properties
This property is used as the default property of div. This property places the
div one after another vertically. The height and width of the div can be
changed using the block property if the width is not mentioned, then the div
under the block property will take up the width of the container.
Property values:
inline |
It is used to display an element as an
inline element. |
block |
It is used to display an element as a block
element |
contents |
It is used to disappear the container. |
flex |
It is used to display an element as a
block-level flex container. |
grid |
It is used to display an element as a
block-level grid container. |
inline-block |
It is used to display an element as an
inline-level block container. |
inline-flex |
It is used to display an element as an
inline-level flex container. |
inline-grid |
It is used to display an element as an
inline-level grid container. |
inline-table |
It is used to display an inline-level table |
list-item |
It is used to display all the elements in
<li> element. |
run-in |
It is used to display an element inline or
block level, depending on the context. |
table |
It is used to set the behavior as
<table> for all elements. |
table-caption |
It is used to set the behavior as
<caption> for all elements. |
table-column-group |
It is used to set the behavior as
<column> for all elements. |
table-header-group |
It is used to set the behavior as
<header> for all elements. |
table-footer-group |
It is used to set the behavior as
<footer> for all elements. |
table-row-group |
It is used to set the behavior as
<row> for all elements. |
table-cell |
It is used to set the behavior as <td>
for all elements. |
table-column |
It is used to set the behavior as
<col> for all elements. |
table-row |
It is used to set the behavior as <tr>
for all elements. |
none |
It is used to remove the element. |
initial |
It is used to set the default value. |
inherit |
It is used to inherit property from its
parents’ elements. |
Word spacing Property
It is a CSS property to increases or decreases the white space between words.
This property can have only two values, they are normal
and length.
CSS Code
Output
Letter spacing Property
The letter-spacing property in CSS is used to set
the spacing behavior between text characters i.e increasing or decreasing the
space between characters in a text.
CSS Code
Output
Vertical-Align Property
The vertical-align property in CSS is used to specify the vertical alignment
of the table-box or inline element.
CSS Code
Output
Text-Align Property
The text-align property in CSS is used to specify the horizontal alignment of
text in an element ie., it is used to set the alignment of the content
horizontally, inside a block element or table-cell
box.
Syntax: text-align:
left|right|center|justify|initial|inherit;
CSS Code 1.
Output
CSS Code 2.
Output
Text-Indent Property
The text-indent property in CSS is used to define the indentation of the first
line in each block of text. It also take negative values. It means if the value is
negative then the first line will be indented
to the left.
Syntax: text-indent: length|initial|inherit;
CSS Code
Output
White-space Property
The white-space property in CSS is used to control the text wrapping and
white-spacing ie., this property can be used to set about the handling of the
white-space inside the elements. There are several types of values in this
property to use.
Syntax: white-space: normal| nowrap| pre| pre-line| pre-wrap| break-spaces| initial| inherit;
CSS Code
Output
No comments: