HTML and CSS Reference
In-Depth Information
CSS Strings and Keywords
In CSS, strings are defined with either single quotes ( 'example' ) or double quotes
( "example" ). Quotes may be found within the opposite quote ( "I say this is an
'example'!" ). Commonly, strings are found when specifying a font name, like so:
p {font-family: "Fancy Font";}
We also find that strings may be used with selectors:
a[title="Match me match me"] {color: red;}
There is an occasional need for special characters in strings; in particular, newlines may
be specified with a "\00000a" value. In situations where a newline is typed, a \ character
can be used as line continuation:
Line here"] {color: red;}
More common than quoted strings are the numerous keyword values found in CSS. The
number of keywords is vast and is used for specifying sizes,
.big {font-size: xx-large;}
.small {font-size: small;}
.downsize {font-size: smaller;}
border styles,
.double {border: 5px solid black;}
.dashed {border-style: dashed;}
text formatting and style,
.style1 {text-decoration: underline;}
.style2 {font-variant: small-caps;}
.style3 {font-weight: bold;}
element meaning,
#nav {display: block;}
#gone {display: none;}
#test {display: inline;}
#region1 {position: absolute; top: 10px; left: 10px;}
#region2 {position: relative; top: -60px; left: 100px;}
#region3 {position: fixed; top: 0px; left: 0px;}
and more.
Search WWH ::

Custom Search