My First CSS Example

This is a paragraph.

Hello World!

These paragraphs are styled with CSS.

Hello World!

This paragraph is not affected by the style.

Red and center-aligned heading

Red and center-aligned paragraph.

Hello World

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.

Hello World

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.



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.



The border-width Property

The border-width property can have from one to four values (for the top border, right border, bottom border, and the left border):

Some text.

Some text.

Some text.



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.



CSS Margins

This element has a margin of 70px.


Using individual margin properties

This div element has a top margin of 100px, a right margin of 150px, a bottom margin of 100px, and a left margin of 80px.


Using individual padding properties

This div element has a top padding of 50px, a right padding of 30px, a bottom padding of 50px, and a left padding of 80px.


Set the height and width of an element

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


Using the text-transform property

This text is transformed to uppercase.

This text is transformed to lowercase.

This text is capitalized.



Using letter-spacing

This is heading 1

This is heading 2



The filter Property

Pineapple Pineapple Pineapple Pineapple Pineapple Pineapple Pineapple Pineapple Pineapple Pineapple Pineapple

Note: The filter property is not supported in Edge 12 or Internet Explorer.