reading-notes

Reading Notes

View the Project on GitHub simon-panek/reading-notes

Code 102: Class 05 - Design web pages with CSS


Read: 5 Chapter 10

CSS (Cascading Style Sheets) alows developer to set rules to specify how content and layout should appear

CSS Rule governs how content of specified elements should be displayed

External CSS Allows a single seperate file to contain all of the style information for a multipage website

Internal CSS *can use CSS in html page by placing them within a <style> element, usually inside a <head> element


<head>
    <title>Using Internal CSS</title>
    <style type="text/css">
        body {
                font-family: arial;
                background-color: rgb(185,179,175);}
    </style>
</head>

CSS Selectors

Selector | Meaning | Example — | — | — Universal Selector | applies to all elements in doc | *{} Type Selector | matches element names | h1, h2, h3 {} Class Selector | matches element whose class attribute has value specified after the . | .example {} ID Selector | matches element whose id attribute has value specified after the # | #example {} Child Selector | matches the element that is a direct child of another | li>a {} Descendant Selector | matches element that is a descendant of another specified element | ` p a {} Adjacent Sibling Selector | matches and element that is the next sibling of another | h1+p {} General Sibling Selector | matches element that is a sibling of another, does not have to be directly preceding element | h1~p {}`

Cascading Rules

Inheritance style properties that are inheritable can be given to all children of an element by default

Online tools that allow developer to test CSS appearance in multiple virtual browsers and or OS

CSS Bug Fixes and Tools

Read: 5 Chapter 11

Color the color: property allows you to specify text color in an element

CSS Comments developer notes that will not effect the code

Background Color background color is set to transparent by default, most browsers show white, but not always

body {
    background_color: rgb(200,200,200):}

Online Color Picking Tool Color Scheme Designer

Opacity allows developer to set the opacity of an element and its children, values from 0.0 to 1.0

HSL Colors defines a color in three terms: hue, saturation, and lightness


Return to reading-notes Deployed Site

Return to reading-notes Mark Down