The text-align property allows you to align text. The values can be left,right,center, andjustify.
This paragraph is aligned center.
This is a paragraph that is aligned right. See how the text aligns to the right side of the containing element?
This is a paragraph that is aligned left. Notice that the text aligns to the left side of the containing element.
Justify means that every line in a paragraph (except for the last) is to take up the full width of a box, much like this paragraph here. In order to make this work, the spacing between words may be adjusted.
To control where an inline-element should appear, we can use the vertical-align property. Some common inline-elements are:<img><em> or <strong>.
Here are a list of inline element options you can use:
Start at the baseline.
Top of the element is aligned with top of tallest element on the line.
Top of element is aligned with top of parent element's font.
Start at middle of parent's element.
Bottom of the element is aligned with the lowest element on the line.
Bottom of element is aligned with bottom of parent element's font.
To control the indentation, we use the text-indent property. It's common to use pixels or ems for the units. If we want to pull back the line, we can use a negative value.
This foam seat cushion relieves lowerback pain, numbness and pressure sores by promoting healthy weight distribution, posture and spine alignment. Furthermore, it reduces pressure on the tailbone and hip bones while sitting. Perfect for sitting on the computer desk for long periods of time.