Every paragraph will be affected by the style.

Me too!

And me!

Hello World!

This paragraph is not affected by the style.

Red and center-aligned heading

Red and center-aligned paragraph.

CSS background-color example!

This is a text inside a div element.

This paragraph has its own background color.

We are still in the div element.

Hello World

Hello World

Hello World

The border-style Property

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 mixed border.

The border-width Property

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.

The border-color Property

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.

Individual Border Sides

2 different border styles.

The border Property

This property is a shorthand property for border-width, border-style, and border-color.

The border-radius Property

This property is used to add rounded borders to an element:

Normal border

Round border

Rounder border

Roundest border

CSS Margins

This element has a margin of 70px.

CSS Padding

This element has a padding of 70px.

Set the height and width of an element

This div element has a height of 200px and a width of 50%.

Heading 1 (center)

Heading 2 (left)

The three headings above are aligned center, left and right.