• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/18

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

18 Cards in this Set

  • Front
  • Back
Purpose of CSS
To apply visual styles/presentation to the HTML code and affect the presentation of the content.
Styles
Sets of name/value pairs representing visual attributes to apply to one or more HTML elements.

For example:
Background, color, font, size, etc.

For example:
h1
{
font-size: 3em;
font-weight: heavy;
font-color: red;
line-height: 10px;
}
CSS
Nature of how styles that are applied
Formatting CSS
h1
{
font-size: 3em;
font-weight: heavy;
font-color: red;
line-height: 10px;
}

OR (on one line):

h1 {font-size: 3em; font-weight: heavy; font-color: red; line-height: 10px;}

Alphabetic, Technical, By Function
Defining styles
External: use <link> to reference.
1. In-line: add style to any given HTML code.
For ex:
Name: value;

2. On-page: CSS with HTML code.

3.
Link to styles
<link rel="stylesheet" href="styles.cs" type="text/css" media="all">
Import Style Sheets in HTML file
@import url(main.css);
Browsers have a built-in style sheet that you are overriding with your styles
(reset.css solves this... kind of)
Code comments in CSS
/* This is a comment */

/* The following code will be ignored because it is a comment:
h1
{
color: red;
}
*/
CSS Selectors
Attaches a style to one or more HTML elements.

If two or more selectors apply to the same element, an order of precedence determine which style is applied.
Different types of CSS Selectors
Tags -- h1 {}

ID -- #firstParagraph {}

Class -- .importantMessage {}
Multiple classes applied to an element
<div class="myClass1 myClass2 myClass3">
akwh
a;kdjs
Other Selectors
article span {} -- descendent
a*b -- universal, b within a regardless of b's parents
a>b -- b direct child of a
a+b -- b sibling of a immediately following a
a-b -- b is a "general" sibling
Inheritance of styles
Parent's styles affects child's style
Controlling inheritance
Use these values for a given property instead of a specific value:

Inherit
none
normal
auto
Important
Gives maximum weight

For ex:

h1
{
color:red !important;
}
Order of precedence
User
Inline
Media
!Important
Specific
Order
Inherited from Parent
Browser Default