css added directly into our HTML tags using the style attribute. example: <p style="color: red">text</p>
Back
Benefits of a CSS
Front
1. Can apply formatting to several elements without rewriting code. 2. Can be used over and over again for many different html pages.
3. Can describe where elements are displayed
4. Saves a lot of work.
Back
cascading
Front
sheets can apply formatting when more than one style applies
Back
Internal (also as embedded)
Front
Applies to the whole html page and is inserted directly into the head tags and enclosed by style tags.
<head>
<title>my title</title>
<style>
p {
color:red;
}
</style>
</head>
Back
Font Families
Front
1. serif: A font with little decorative bits on the ends of the strokes that make up letters.
2. sans-serif: A plain-looking font. It doesn't have decorations
3. cursive: A scripty font. It looks like cursive writing.
Back
external css link
Front
goes between head tags on html document and has three attributes
1. type - should always be equal to "text/css"
2. rel - should always be equal to "stylesheet"
3. href - should point to file name
example:
<link type="text/css" rel="stylesheet" href="CSS file name"/>
Back
CSS
Front
Cascading Style Sheets - the skin and makeup our our web page. It allows us to apply styling
Back
external
Front
separate css file created on a text editor - it is not part of the html document, and can be used again and again for multiple web pages
p {
color:red;
}
a {
color:blue;
}
Back
em
Front
Is a relative measurement. One em is equal to the default size, two ems would double the default font-size, and .5 ems would half the default size.
Back
.css
Front
the file extension for external css
Back
comments
Front
/my comment/
Back
Hexadecimal values
Front
1. counting base 16 with each digit being the number 0-9 and the letters a-f.
2. they always start with a # and are up to 6 digits long
3. not case-sensitive, capitalization doesn't count
Back
Pixels
Front
dots on your computer screen that make up an image
Back
style sheet
Front
describes how our html file should look and holds our formats
Back
declaration block
Front
contains one or more properties and values separated by semi-colons and contained within curly braces
example : p (selector) {
color:blue;
font-size:12px; Declaration Block
font-family: Arial;
}
Back
Selectors
Front
the name for the tags that we use in CSS. In HTML they are call tags - such as the "p" tag, in CSS they are called selectors - such as the "p" selector