Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.47 KB

File metadata and controls

50 lines (37 loc) · 1.47 KB

Design web pages with CSS

CSS Properties Affect How Elements Are Displayed

CSS declarations sit inside curly brackets and each is made up of two parts: a property and a value, separated by a colon. You can specify several properties in one declaration, each separated by a semi-colon.

1

Using CSS

CSS can be added to HTML documents in 3 ways:

  • Inline - by using the style attribute inside HTML elements
  • Internal - by using a (style) element in the (head) section
  • External - by using a (link) element to link to an external CSS file

colors in CSS

Color Tag In CSS

  1. Foreground Color

by useing (color)

  1. Background Color

by useing (background-color)

The color property allows you to specify the color of text inside an element or background . You can specify any color in CSS in one of three ways:

  1. rgb values

These express colors in terms of how much red, green and blue are used to make it up. For example: rgb(100,100,90)

  1. hex codes

These are six-digit codes that represent the amount of red, green and blue in a color, preceded by a pound or hash # sign. For example: #ee3e80

3.color names

There are 147 predefined color names that are recognized by browsers. For example: DarkCyan

2

For more info about colos you can vist this website W3school