LESSON 3 Flashcards
CSS stands for
Cascading Style Sheets
is a simple design language intended to
simplify the process of making web pages presentable. you can control the color of the
text, the style of the fonts, the spacing between paragraphs, what background images or colors are used, as well as a variety of other effects.
CSS
PARTS OF A CSS RULE
1) SELECTOR
2) DECLARATION
The _ points to the HTML element you want to style.
SELECTOR
The _ block contains one or more _ separated by
semicolons. Each _ includes a CSS property name and a value, separated by a colon.
DECLARATION
3 WAYS TO INCLUDE CSS IN HTML
1) INLINE
2) INTERNAL
3) EXTERNAL STYLE SHEET
_ is used if you want to apply style directly to each element
1) INLINE
The _ style is defined inside the <style></style>.
It is usually added inside the <head> element.
INTERNAL
An _ css can be written in a separate document and saved with a .css
extension. In your HTML document, add a <link></link> tag then insert the name of your css document with extension.
EXTERNAL STYLE SHEET
COMMON SELECTOR TYPES
1) SIMPLE SELECTORS
2) Psuedo-Class SELECTORS
3) Psuedo-ELEMENT SELECTORS
SIMPLE SELECTORS
Universal
Element
id
class
A _ is used to define a special state of an element.
Psuedo-Class SELECTORS
A CSS _ is used to style specified parts of an element.
Psuedo-ELEMENT SELECTORS
_are ignored by the browser and are usually placed inside the <style> element unless it is in an external file.
It starts with /* and ends with */ characters.</style>
CSS COMMENT
_ are specified using predefined color names, or RGB, HEX, HSL, RGBA, and HSLA values.
COLOR VALUES
COLOR VALUES
1) NAMES
2) RGB
3) HSL
4) HEX
In CSS, a color can be specified by using a
predefined color name.
NAMES
_ stands for red, green, blue Each parameter (red, green, and blue) defines the intensity of the color between 0 and 255.
RGB
_(hue, saturation, lightness) Hue is a degree on the color wheel from 0 to 360. 0 is red, 120 is green, and 240 is blue.
Saturation is a percentage value. 0% means a shade of gray, and 100% is the full color. Lightness is also a percentage. 0% is black, 50% is neither light or dark, 100% is white
HSL
A hexadecimal color is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. Values of each color ranges between 00 and ff (same as decimal 0-255)
HEX
TEXT PROPERTIES
COLOR
TEXT-ALIGN
TEXT-DECORATION (line, color, style, thickness)
TEXT-TRANSFORM
LETTER-SPACING
LINE-HEIGHT
WORD-SPACING
TEXT-SHADOW
FONT PROPERTIES
FONT-FAMILY
FONT-STYLE (Normal, Italic )
FONT-WEIGHT (Normal, Bold)
FONT-SIZE
BACKGROUND PROPERTIES
background-color
background-image
background-size
background-repeat
background-attachment
The CSS _ is a container that contains multiple properties including
borders, margins, padding, and the content itself.
THE BOX MODEL