CSS properties allow you to control virtually every visual aspect of your web pages. This page demonstrates some of the most commonly used properties and their effects.
Border Properties
The border property allows you to specify the style, width, and color of an element's border.
The text-align property specifies the horizontal alignment of text in an element.
This text is aligned to the left.
This text is centered.
This text is aligned to the right.
This text is justified. It will stretch the lines so that each line has equal width. This is often used in newspapers and magazines. Notice how the spacing between words is adjusted to ensure the text spans the entire width.
The float property specifies whether an element should float to the left or right, or not at all.
Float Left
Float Right
This text flows around the floated elements. Notice how the text wraps around the boxes that are floated to the left and right. This technique is commonly used for text wrapping around images.