Lesson 12 CSS
Lesson 12 CSS
selector declaration
The sample code below shows an example of
a style statement used in embedded and
external style sheet.
selector declaration
TYPE LEVEL AND PRECEDENCE
Inline To change the style within an
individual HTML tag
Overrides embedded and external
style sheets
Embedded To change the style of one page
Overrides external sheets
External To change the style of multiple pages
in the Website
PROPERTY NAME OPTION CAN BE CONTROLLED
background color
image
position
border color
style
width
font family
size
style
variant
PROPERTY NAME OPTION CAN BE CONTROLLED
margin length
Percentage
text alignment
decoration
indentation
spacing
white space
list image
position
type
In order to gain more control, you can define
specific elements of an HTML file as a
category or class
You then can create a specific style for each
class.
The style statement uses the selector and a
series of property-value statements in the
declaration to define the text declaration,
font family and font size for all links.
Setting the text-decoration property to a
value of none will remove the underline from
all links.
◦ blink – causes the text to blink on and off
◦ line-through – places a line through the middle of
the text.
◦ overline – places a line above the text
◦ underline-places a line below the text
The link:hover property defines the way a link
displays when a mouse pointer points to or
hovers over a link.
http://www.w3schools.com/css/default.asp