This is a paragraph.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
Same as color name "Tomato":
Same as color name "Tomato", but 50% transparent:
In addition to the predefined color names, colors can be specified using RGB, HEX, HSL, or even transparent colors using RGBA or HSLA color values.
By using equal values for red, green, and blue, you will get different shades of gray:
This property specifies what kind of border to display:
A dotted border.
A dashed border.
A solid border.
A double border.
A groove border.
A ridge border.
An inset border.
An outset border.
No border.
A hidden border.
A mixed border.
This property specifies the width of the four borders:
Some text.
Some text.
Some text.
Some text.
Some text.
Some text.
Note: The "border-width" property does not work if it is used alone. Always specify the "border-style" property to set the borders first.
This property specifies the color of the four borders:
A solid red border
A solid green border
A dotted blue border
Note: The "border-color" property does not work if it is used alone. Use the "border-style" property to set the borders first.
2 different border styles.
4 different border styles.
3 different border styles.
2 different border styles.
1 border style.
This property is a shorthand property for border-width, border-style, and border-color.
This property is a shorthand property for border-left-width, border-left-style, and border-left-color.
This property is a shorthand property for border-bottom-width, border-bottom-style, and border-bottom-color.
This property is used to add rounded borders to an element:
Normal border
Round border
Rounder border
Roundest border
You can set the margin property to auto to horizontally center the element within its container. The element will then take up the specified width, and the remaining space will be split equally between the left and right margins:
Let the left margin be inherited from the parent element:
This paragraph has an inherited left margin (from the div element).
In this example the h1 element has a bottom margin of 50px and the h2 element has a top margin of 20px. So, the vertical margin between h1 and h2 should have been 70px (50px + 20px). However, due to margin collapse, the actual margin ends up being 50px.
The three headings above are aligned center, left and right.
The text-align: justify; value stretches the lines so that each line has equal width (like in newspapers and magazines).