Tutorial 7 – Cascade Style Sheets Notes
· A pixel is the smallest display element on your computer.
·
To display a
font in small caps, use the style font-variant:small-caps.
·
To display the first line of your paragraphs in uppercase, you could
create the following style definition: P:first-line text-transform: uppercase.
·
When a pointer passes over a hyperlink, the link changes appearance to
indicate that the text is a link; this is called a rollover effect.
·
Body color:teal, body
color:#008080, and body color:rgb(0,128,128) are all
examples of formats that can be used to set a body text color.
·
Setting the text-align value to justify stretches the text, extending it
from the left to the right margin.
·
CSS considers “bold” to be an aspect of the font’s weight.
·
A comma is used to separate one font name from another.
·
Use a monospace font name for a
typewriter-style font.
·
Sans-serif is an example of a generic font.
·
Arial is an example of a specific font.
·
The font-family attribute allows you to choose a font face for use in a
Web page.
·
Body color:blue style
definition sets all font color to blue.
·
An embedded style has precedence over an external style sheet.
·
You can link a Web page to a style sheet by adding a <link> tag to
the head section of your html file.
·
Most style sheets have the extension .css.
·
The collection of attributes and values in a selector is referred to as
the declaration of the selector.
·
When you make a style declaration, the attributes and values within the
curly brackets indicates the styles applied to all the occurrences of that
element.
·
The syntax of an embedded style declaration is: <style type=”style sheet
language”>style declarations</style>.
·
Text/css is a style language available for use
with CSS.
·
To create an embedded style, you insert a <style> tag within the
head section of your html file.
·
Multiple attributes can be used as long as you separate each one by a
semicolon.
·
An inline style declaration must be enclosed within double quotation
marks.
·
To create an inline style, you add the style property to the html tag.
·
To control the style for the entire Web site, you would use a linked
style sheet.
·
If you need to modify all instances of a particular element in a Web
page, you’d use an embedded style.
·
If you need to format just a single section in your Web page, you would
use an inline style.
·
When you create a linked style, the result is a text file containing the
style declarations.
·
When you create an embedded style, you apply the style to the entire
html file.
·
When you create an inline style, you add styles to each individual tag
within the html file.
· Style sheets use a common language called css.
·
If you wanted your paragraphs to be double-spaced, you
would enter the style definition: P line-height:2.
· H1 font-size: 0.5in creates a H1 header that will be ½ inch in size.
· The standard way of controlling font sizes with HTML is by using the SIZE property of the <font> tag.
·