To assign a value 'valvvvv' to a property 'namennnn', use the notation namennnn:valvvvv (no quotes)
1.In a block, the padding area is the area that lies between the text and the border - the margin is on the outer side of the border -- this can be shown in the following figure:

aaaaa
xxxxxx
xxxxxx
xxxxxx
aaaaa
The border is the red line separating the green area from the yellow one.
The padding area is what separates the text 'xxxxx' from the border (it is part of the green interior of the block)
The margins lies outside the border, in the yellow area. It is seen on the left and the right, and between the border and the 'aaaaa' text.
The element content area is the part containing the text, surrounded by the padding area
2.An element can be in-line or block. An in-line element has one logical line (it can be rendered on more than one line if its length requires). A block element has intrinsically more than one line.
3.The contents of an element in a document are rendered in a rectangular box. This can be:
- an in-line box, or
- a block box
A box is composed of these areas:
- the contents area that contains the text
- the padding area that surrounds the text
- the border that surrounds the padding area
- the margin area that lays outside the border, and is the outermost part of the box
The figure in Note 1. hints at a box that encloses the text "xxxxxx" ... The contents and padding areas are green. The margin is always transparent, so the yellow color is from the containing box (which contains also the 'aaaaa' sequences), which shows through.
NameValuesComments
backgrounddefines the background properties, that can be distinguished into:
- background-color
- background-image
- background-repeat
- background-attachment
- background-position
A mix of the values that can be assigned to each of these categories, can be assigned to the background property, as a space separated list. For example:
style="background:url(Chorus.gif) fixed 10% 10%;"
url(Chorus.gif)is a value of background-image
fixedis a value of background-attachment
10% 10%is a value of background-position
background-colordefines the background color
color valueExamples:
background-color:green
background-color:#FFD8A5

specifies an opaque value - by a name or an hexadecimal code
transparentExample: background-color:transparent - makes the background transparent so that the parent element background shows through - this is the initial value
inheritmakes the color inherited from the parent element
background-imagespecifies an image as the background
url(uri)Example: background-image:url(../Images/FlowerChorus.bmp) - use the 'url' function (the 'background' attribute where available, is noted background="uri")
noneno image assigned (to override the inherited property) -- this is the initial value
inheritmakes the property inherited from the parent element
background-repeatspecifies whether the image is repeated or not
repeatrepeat the image both horizontally & vertically -- this is the initial value
repeat-xrepeat the image horizontally
repeat-yrepeat the image vertically
no-repeatthe image is not to be repeated
inheritmakes the image inherited from the parent element
background-attachmentused with an image background -- specifies whether the image is fixed in the viewport, or attached to the document, and scrolls with it
fixedthe image is fixed in the viewport
scrollthe image scrolls with the document -- this is the initial value
inheritthe property is inherited from the parent element
background-positionused with an image background -- specifies the position of the image with respect to the document's padding area1
x% y% - Example:
19% 84%
the point at x% across and y% down in the image is placed at the point at x% across and y% down of the document padding area - with 0% 0% the upper left corner of the image is at the upper left corner of the padding area, whereas 100% 100% places the lower right corner of the image at the lower right corner of the padding area -- initial value: 0% 0%
x y - Exemple:
3cm 2cm
places the position of the image upper left corner at the coordinates (x, y) with respect to the padding area -- if no measure unit is specified, the coordinates are in pixels -- a measure unit such as cm can be specified
Combination of absolute coordinates is allowed -- for example: 50% 3cm
top|center|bottom left|center|rightExample: background-position:center right;
As the first symbol:
top designates the 0% position
center designates the 50% position
bottomdesignates the 100% position
As the second symbol:
left designates the 0% position
center designates the 50% position
rightdesignates the 100% position
If one value is specified, it sets the horizontal position, the vertical position is 50%
inheritthe property is inherited from the parent element
borderdefines the properties of the border1. These properties can be separately defined through the properties:
- border-color
- border-width
- border-style
You can assign to the 'border' property the values suitable for these properties.
border-collapseDefines the border collapse property for table elements. The possible values are:
collapseExample: border-collapse:collapse - adjacent borders are collapse into a single border (this is the initial value)
separateExample: border-collapse:separate - adjacent borders remain separate
inheritExample: border-collapse:inherit - the property is inherited from the parent element
border-colorDefines the color property of the border.
The possible values are:
colorExample: border-color:red - specifies the color of the border
inheritthe property is inherited from the parent element
One color can be specified for all the 4 borders, or colors can be individually specified for the different borders as follows:
- 4 values can be specified, one for each side - the assignment follows this clock-wise order: top-right-bottom-left.
- with 3 values, they are assigned in the following order to: top-right-bottom, the left side is assigned the same value as the right
- with 2 values, the first value is assigned to the top and bottom sides, the second to the right and left
- with 1 value, all 4 sides are assigned this value
The property can also be split into 4 properties to be defined independently:
- border-top-color
- border-right-color
- border-bottom-color
- border-left-color
border-spacingproperty of a table element -- defines the spacing between the table cells; the space is transparent and the table background color shows through
lengthExample: border-spacing: 1em; - both horizontal and vertical spacing are 1 line height
When 1 value is specified, it defines both horizontal spacing (space to the left and the right of each cell) and vertical spacing (space above and below)
length lengthExample: border-spacing:1em 0; - horizontal spacing is 1 em (1 line height), vertical spacing is 0
border-widthdefines the width of the border1 on the 4 sides
thinExample: border-width:thin - thin border
mediumExample: border-width:medium - medium width border
thickExample: border-width:thick - thick border
lengthExample: border-width:2 - defines the width as a length data type value.
Using the 'border' property, different values can be assigned to the different sides:
- 4 values can be specified, one for each side - the assignment follows this clock-wise order: top-right-bottom-left.
- with 3 values, they are assigned in the following order to: top-right-bottom, the left side is assigned the same value as the right
- with 2 values, the first value is assigned to the top and bottom sides, the second to the right and left
- with 1 value, all 4 sides are assigned this value
The property can also be split into:
- border-top-width,
- border-right-width,
- border-bottom-width,
- border-left-width,
with each property independently assigned.
border-styleDefines the style of the 4 borders:
noneno border the border-width property is forced to 0
hiddensame as 'none', except in conflict resolution for table elements (the 'hidden' border has precedence and hides the borders with which it is in conflict)
dottedborder is a series of dots
dashedthe border is a series of dashes
solidthe order is a solid line
doublethe border is two solid lines
groovethe border looks like a groove
ridgethe border looks like a ridge
insetthe border makes the block looks as though it is depressed to a level below the surrounding surface
outsetthe border makes the block look as though it is raised above the surrouding level.
One style can be specified for all the 4 borders, or styles can be individually specified for the different borders as follows:
- 4 values can be specified, one for each side - the assignment follows this clock-wise order: top-right-bottom-left.
- with 3 values, they are assigned in the following order to: top-right-bottom, the left side is assigned the same value as the right
- with 2 values, the first value is assigned to the top and bottom sides, the second to the right and left
- with 1 value, all 4 sides are assigned this value
The property can also be split into 4 properties to be defined independently:
- border-top-style
- border-right-style
- border-bottom-style
- border-left-style
bottomUsed for a positioned element - specifies the distance between the bottom of the element content1 and the bottom of the containing element, which is at the bottom edge of its bottom-margin.
The other properties used in this connection are:
- left
- right
- top
lengthExample: bottom:20 - distance expressed as a length data type value
len%Example: bottom:5% - distance expressed as a percentage of the total element height
autohte distance is automatically determined -- this is the initial value
inheritthe property is inherited from the parent element
caption-sideused with a table CAPTION element, specifies the position of the caption relative to the table
topthe caption is on top of the table -- this is the initial value
bottomthe caption is on the right of the table
leftthe caption is on the left of the table
rightthe caption is on the right of the table
inheritthe property is inherited from the parent element
clearspecifies the side(s) of an element that can NOT be adjacent to an ealier floating element, so that if the case may arise, the element be set on a line below the floating element.
nonenone of the sides is to be clear of contact
leftthe left side should be clear
rightthe right side should be clear
bothboth sides should be clear
inheritthe property is inherited from the parent element
clipWhen the text in an element is too large for this element, the clip property defines which part of the content is visible. The clip is that viewport which shows the visible part.
shape Example: clip:rect(9,5,20,15) - defines the clip as a geometric figure -- presently only a rectangle is allowed.
The above example defines a rectangle whose top right corner is 9 pixel from the top and 5 from the right, and whose bottom left corner is 20 pixels from the bottom and 15 from the left.
auto the clip has the same size as the element content
inheritthe property is inherited from the parent element
colorspecifies the foreground color of an element
color Example: #DD0000 - specifies the color
inheritthe property is inherited from the parent element
contentAdds text before or after an element of a given type.
The content property is defined for one of the pseudo classes before or after. These classes are called 'pseudo' because elements are assigned to them without the 'class' attribute being used. Here is a sample page using the content property:

<HTML><HEAD><TITLE>PROPERTIES - CONTENT</TITLE>
<STYLE>
DIV:before {content:"----"}
DIV:after {content: "!!!!"}
Q:before {content:' " '}
Q:after {content:' " '}
P:before {content:open-quote}
P:after {content:close-quote}
</STYLE>
</HEAD>
<BODY>
<DIV>some text</DIV>
<Q>quoted text</Q>
<P>other text</P>
</BODY></HTML>

To see the result, please click here
May be your browser doesn't support this property (Internet Explorer 6.0 does not), so you would not see what is being commented on now.
In the STYLE element, the line
DIV.before {content:"-----"}
defines the property content for all the DIV elements of the (pseudo) class 'before'. This property is assigned the value "-----". Similarly, the subsequent line defines the property content for all the DIV elements of the (pseudo) class 'after'. If your browser supports this property, the before and after text specified in the STYLE element is added to the content of the element, like this:
-----some text!!!!!
. The content property is defined for all the element of a given type.
stringExample: content:"-----" - specifies a text string that is displayed before or after all elements of a given type
uriExample: content:http//www.company.com/text.html - identifies a document the contents of which is displayed before or after all the elements of given type.
counter(name, style)Example: counter(para, decimal) - causes a counter to be incremented and displayed before or after all the elements of a certain type.
open-quoteExample: content:open-quote - causes an opening quote sign to be displayed (normally) before all elements of a given type.
close-quoteExample: content:close-quote - causes a closing quote sign to be displayed (normally) after all elements aof a given type.
attr(X)Example: content:attr(id) - causes the value of the attribute named in the parentheses to be displayed before or after all elements of a given type.
inheritthe property is inherited from the parent element
counter-incrementdefined in a style sheet for an element - increments a number of counters each time an element of the same type is encountered -- these are specified in a space separated list. The counters need not be defined beforehand. They exist by being named in a counter-increment property. The counter-reset property can set them to any desired value. If no such property was encountered first, a counter has an inital value of 0.
Counters are displayed by being passed as arguments to the function counter() or counters() assigned as value to the content property:
content:counters(counter-1, counter-2)
identifier integer Example: counter-increment:chapter 1 section - each counter in the list is represented by a pair of identifier/integer where the 'identifier' is a name composed of letters, digits and hyphen, with the first character a letter, and 'integer' the quantity by which the counter is incremented -- by default the 'integer' value is 1
noneExample: counter-increment:none - no increment
inheritthe property is inherited from the parent element
counter-resetdefined in a style sheet for an element - resets a number of counters each time an element of the same type is encountered -- these are specified in a space separated list.
Counters are displayed by being passed as arguments to the function counter() or counters() assigned as value to the content property:
content:counters(counter-1, counter-2)
identifier integer Example: counter-reset:section 1 paragraph 1 - each counter in the list is represented by a pair of identifier/integer where the 'identifier' is a name composed of letters, digits and hyphen, with the first character a letter, and 'integer' the value to which the counter is reset
noneExample: counter-ncrement:none - no increment
inheritthe property is inherited from the parent element
cursordefines the shape of the cursor that is displayed when the mouse pointer hovers over the element. Here is an example:
<DIV style="cursor:pointer;">pointer cursor</DIV>
<DIV style="cursor:move;">move cursor</DIV>
<DIV style="cursor:w-resize;">w-resize cursor</DIV>
<DIV style="cursor:wait;">wait cursor</DIV>
The sequence is displayed like this (please point the mouse on the text, to see):
pointer cursor
move cursor
w-resize cursor
wait cursor
The possible values are:
url(uri)Example: url(http://www.ste.com/html/sign.gif) - the cursor is an image contained in a file located by its URI - note the use of the 'url' function.
autodetermined by the user agent based on the context
crosshaircross-hair cursor
defaultdefault cursor depending on the platform
pointera sign indicating a link (often a hand -- see example above)
movethe element can be moved (see above example).
resizethe same as move.
n-resizethe element can be resized by moving its boundary to the North
ne-resizethe element can be resized by moving its boundary to the North-East
e-resizethe element can be resized by moving its boundary to the East
se-resizethe element can be resized by moving its boundary to the South-East
s-resizethe element can be resized by moving its boundary to the South
sw-resizethe element can be resized by moving its boundary to the South-West
w-resizethe element can be resized by moving its boundary to the West
nw-resizethe element can be resized by moving its boundary to the North-West
textthe cursor usually indicating a text entry area
waitthe cursor indicating a wait state (an hour glass or a clock)
helpa cursor indication help is available for the element
inheritthe property is inherited from the parent element
directionspecifies the reading direction of th text contained in the element
LTRLeft to Right - this the initial value
RTLRight to Left
inheritthe property is inherited from the parent element
displayThis property is mainly used to define structures such as tables or lists, in a language like XML. These structures are taken care of by the elements of the HTML language. In this language, the display property can be used to display in-line an element which natively is displayed as a block, and vice versa. Here is an example:
This text is followed by an in-line table. <TABLE style="display:inline;" border="1"> <TR><TD>AAA<TD>BBB <TR><TD>CCC<TD>DDD </TABLE> Sequel: <SPAN style="display:block; border:thin dashed red; width:150">this is to be in a block</SPAN> contituation
To see how the document is displayed, please click here
The values useful in HTML are:
inlinecauses the element to be displayed in-line
blockcauses the element to be displayed as block
inheritthe property is inherited from the parent element
floatfloats the element to the left or the right of the display space (a page or a table cell, etc.) and lets the surrounding text flow resp. to its right or its left.
leftthe element is floated to the left and lets the text flow to the right
rightthe element is floated to the right and lets the text flow to the left
nonethe element is processed normally
inheritthe property is inherited from the parent element
fontdefines the font properties of the characters contained in the element. These properties can be separated into more precisely targeted properties:
- font-family,
- font-size,
- font-style,
- font-variant,
- font-weight,
- line-height
Values defined for these properties can be assigned to the 'font' property.
Values specifically defined for the 'font' property refer to system fonts which can have other values defined in a space separated list:
captionthe font is used for captioned controls (such as buttons)
iconthe font is used for icons labelling
menuthe font is used in menus
message-boxthe font is used in dialog box
small-captionthe font is used for labelling small controls
status-barthe font is used in window status bars
font-familyspecifes the font family name as one in a list
family listExample: "arial, univers, sans-serif" - The characters in the element are to be rendered in one of the fonts in the list. This list contains particular font names, and also generic names which designate a number of fonts of similar characteristics. It is recommended to name a generic family, in case the user agent cannot find any of the particular fonts in the list.
family-nameExample: arial - A family name is the name of one of the fonts specified in the family list. Some of the family names are: Times New Roman, Bodoni, Garamond, Arial, Univers, Helvetica, Courier New, Prestige.
generic-familyExample: sans-serif - Generic families are categories of fonts that include sets of the particular fonts - the following generic families are defined in the HTML specification:
- cursive - this family includes such fonts as Caflish Script, Adobe Poetica, Snell Roundhand, Zapf-Chancery
- fantasy - this family includes such fonts as Alpha Geometrique, Critter, Cottonwood, FR Reactor, Studz
- monospace - all characters have the same width - fonts of this family include Courrier New, Prestige, Everson Mono
- sans-serif - characters without serif - fonts in this family include MS arial, MS verdana, helvetica, univers, futura
- serif - characters decorated with serifs which are slight projections finishing off the strokes of the letters - fonts in this family include Time New Roman, Bodoni, Garamond, Minion Web
font-sizespecifies the font size
absolute-sizeExample: font-size:medium - the possible values are, with their obvious meaning, from the smallest to the largest: xx-small | x-small | small | medium | large | x-large | xx-large
relative-sizeExample: font-size:larger - the possible values are larger and smaller
lengthExample: font-size:12px - expresses the font size as a length data type
percentageExample: font-size:85% - expresses the font size as a percentage of the font size in the parent element
inheritthe property is inherited from the parent element
font-size-adjustIn typographer parlance, a glyph is a graphical representation of a character when rendered on the supporting medium. The term 'glyph' is to be used because in some languages the same character can have more than one representation. Here are some tentative definitions:
- The font size is the heigth of an abstract rectangle that contains the highest glyph in the font
- The x-height of a font is the height of the lower case glyphs.
- The aspect of a font is the result of dividing the x-height by the font size
It is the x-height that determines legibility. Different fonts have different aspects, so that with the same font size, they do not offer the same legibility. The higher the aspect, the more legible a font is, at the same font size.
When a font family is specified and cannot be found, the user agent has to find a substitute font of approximately the same appearance. To preserve the intended legibility, not the font size, but the x-height is to be made equivalent, and the font size is to be adjusted accordingly. This is done by reference to the 'aspect' which is an information usually associated with a font, rather then the x-height.
The document author uses the font-size-adjust property to specify the aspect value of the first choice font (as specified by the font-family property), to help the user agent adjust the font size of a substite font. The possible property values are:
nonedo not preserve x-height
numberExample: font-size-adjust:0.46 - specifies the aspect value of the first choice font.
inheritthe property is inherited from the parent element
font-stretchThis property is used with the font-family property to direct the user agent to choose a font with a desired stretch (horizontal extension)
normalExample: font-stretch:normal
relativeExample: font-stretch:wider
The possible relative values are wider and narrower
absoluteExample: font-stretch:extra-condensed - The possible absolute values are, from the narrowest to the widest:
ultra-condensed
extra-condensed
condensed
semi-condensed
normal
semi-expanded
expanded
extra-expanded
ultra-expanded
inheritthe property is inherited from the parent element
font-stylespecifies the font style as normal, oblique or italic:
normal specifies the normal font
obliquespecifies a font classified as oblique by the user agent
italicspecifies a font classified as italic by the user agent
inheritthe property is inherited from the parent element
font-variantSpecifies the characters as normal or small-caps. Here is how your browser renders small caps :
small-caps
(the source of this is <span style="font-variant:small-caps">small-caps</span>)
The possible values are:
normalnormal font
small-capssmall caps font
inheritthe property is inherited from the parent element
font-weightspecifies the weight of the font - here are the possible values and how they are rendered by your browser:
normalExample: font-weight:normal - sample: rendered text
boldExample: font-weight:bold - sample: rendered text
bolderExample: font-weight:bolder - sample: rendered text
lightExample: font-weight:light - sample: rendered text
lighterExample: font-weight:lighter - sample: rendered text
100Example: font-weight:100 - sample: rendered text
200Example: font-weight:200 - sample: rendered text
300Example: font-weight:300 - sample: rendered text
400Example: font-weight:400 - sample: rendered text
500Example: font-weight:500 - sample: rendered text
600Example: font-weight:600 - sample: rendered text
700Example: font-weight:700 - sample: rendered text
800Example: font-weight:800 - sample: rendered text
900Example: font-weight:900 - sample: rendered text
heightspecify the content1 height of a block2 element.
lengthExample: height:72 - specifies the height as a data of the length type
percentageheight:33% - specifies the height as a percentage of the containing element height
autoheight:auto - lets the user agent determine the element height
inheritthe property is inherited from the parent element
leftUsed with a positioned element - specifies the distance between the element left edge and the containing element left edge (the left edge is the left side of the left margin1.
The other properties used in this connection are:
- bottom
- right
- top
lengthExample: left:12 - specifies the distance as a data of the length type - the example specifies 12 pixels.
percentageleft:33% - specifies the distance as a percentage of the containing element width.
autoleft:auto - lets the user agent determine the distance
inheritthe property is inherited from the parent element
letter-spacingspecifies the space width between 2 consecutive letters.
normalExample: letter-spacing:normal - lets the user agent apply the normal letter spacing of the fonts.
lengthExample: letter-spacing:-1 - specifies an extra space added to the normal inter-character spacing - negative values are allowed (limits may be set by the user agent).
inheritthe property is inherited from the parent element
line-heightdefines the line height of an element, i.e. the height including the top and bottom margins1.
If the element is an in-line element, the property defines its exact height
If the element is a block element, the property defines the minimum height of its lines
normalExample line-height:normal - the line height is determined by the user agent, based on the font-size (usually, it is about 120% of the font size)
numberExample line-height:14 - the line height is expressed as a number
lengthExample line-heigth:14 - the line height is expressed as a length data type
percentageExample line-height:120% - the line height is expressed as a percentage of the font size in the element
inheritthe property is inherited from the parent element
list-stylespecifies the properties of a list element as defined by the UL, OL or DL tag. this property can be split into:
- list-style-type
- list-style-position
- list-style-image
The values defined for the latter can be assigned to the 'list-style' property.
This property can be made to inherit from the conaining element, by the value 'inherit'
list-style-imagedefines an image to be used as the list marker
uriExample: list-style-image:url(http://www.company.com/images/diamond.gif" - the url function is to be used - its argument is the URI of the image file.
noneExample: list-style-image:none - no image
inheritthe property is inherited from the parent element
list-style-positionspecifies the position of the marker with respect to the rectangular box containing the list element (i.e. the UL element)
insidethe marks are inside - for example:
<UL style="list-style-position:inside;width:200px">
<LI>xxxxxxxxxxxxxx xxxxxxxxxx xxxxxxx xxxxxxx xxxxxxx xxxxx xxxxxx xxxxxxx xxxxx xxxxxxx
<LI>yyyyyyy yyyyyyyy yyyyyyy yyyyyy yyyyyyy yyyyy yyyyyy
</UL>

would yield:
  • xxxxxxxxxxxxxx xxxxxxxxxx xxxxxxx xxxxxxx xxxxxxx xxxxx xxxxxx xxxxxxx xxxxx xxxxxxx
  • yyyyyyy yyyyyyyy yyyyyyy yyyyyy yyyyyyy yyyyy yyyyyy
outsidethe marks are outside - this is the initial value
inheritthe property is inherited from the parent element
list-style-typespecifies the appearance of the list-item marker.
There are 3 types of marker:
- glyphs
- numeric
- alphabetic
glyphExample: list-style-type:disc - the possible values in this category are:
- disc
- circle
- square
numericExample: list-style-type:decimal - the possible values in this category are:
decimal decimal number starting with a 1.
decimal-leading-zero decimal number padded by leading zero as needed to give all the marks the same number of digits
lower-roman lower case roman numerals
upper-roman upper case roman numerals
hebrew traditional Hebrew numbering
georgian traditional Georgian numbering
armenian traditional Armenian numbering
cjk-ideographic Plain ideographic numbers
hiragana a, i, u, e, o, ka, ki, ...
katakana
hiragana-hiroha
katakana-hiroha
alphabeticExample: list-style-type:lower-alpha - the possible types in this category are:
lower-alpha or equivalently lower-latin lower case letters
upper-alpha or equivalently upper-latin upper case letters
lower-greek greek letters
inheritthe property is inherited from the parent element
marginspecifies the width of the element margin1.
lengthExample: margin:0.5em - the margin, on the 4 sides, is assign a width equal to 0.5 of the line height. The possible units are:
em - current line height
px - pixels
ex - x-height of the current font
percentageExample: margin:5% - the margin width is expressed as a percentage of the box containing the element text.
autoExample: margin:auto - lets the user agent automatically determine the margin width - this is the initial value
One width can be specified for all the 4 margins, or widths can be individually specified for the different margins as follows:
- 4 values can be specified, one for each side - the assignment follows this clock-wise order: top-right-bottom-left.
- with 3 values, they are assigned in the following order to: top-right-bottom, the left side is assigned the same value as the right
- with 2 values, the first value is assigned to the top and bottom sides, the second to the right and left
- with 1 value, all 4 sides are assigned this value
The property can also be split into 4 properties to be defined independently:
- margin-top
- margin-right
- margin-bottom
- margin-left
marker-offsetUsed with a list element - the text in a list element is contained in a box, and the markers are in a box to the left (if list-style-position is 'outside'), separated from the former. The marker-offet property specifies the distance between these two.
lengthExample: marker-offset:0.3em - the markers are at a distance worth 0.3 line height. The possible measure units are:
emcurrent line height
pxpixels
excurrent font x-height
autoExample: marker-offset:auto - let the user agent determine the offset
inheritthe property is inherited from the parent element
marksspecifies the page marks that are laid out on the outside of the page boxes, for use in preparing printed documents
cropExample: marks:crop - the pages receive the crop mark that indicate where to cu
crossExample: marks:cross - the pages receive the cross marks used to align sheets
noneExample: marks:none - no mark
inheritthe property is inherited from the parent element
max-heightspecifies the maximum height of the element
lengthExample: max-height:200px - the maximum height is specified as a length type data. The measure units that can be used are:
emcurrent line height
pxpixels
excurrent font x-height
percentageExample: max-height:33% - the maximum height of the element is specified in terms of percentage of the containing element
noneExample: max-height:none - there is no limit - this is the initial value
inheritthe property is inherited from the parent element
max-widthspecifies the maximum width of the element
lengthExample: max-width:300px - the maximum width is specified as a length type data. The measure units that can be used are:
emcurrent line height
pxpixels
excurrent font x-height
percentageExample: max-width:70% - the maximum width of the element is specified in terms of percentage of the containing element
noneExample: max-height:none - there is no limit - this is the initial value
inheritthe property is inherited from the parent element
min-heightspecifies the minimum height of the element
lengthExample: min-height:5em - the minimum height is specified as a length type data. The measure units that can be used are:
emcurrent line height
pxpixels
excurrent font x-height
percentageExample: min-height:33% - the minimum height of the element is specified in terms of percentage of the containing element
inheritthe property is inherited from the parent element
min-widthspecifies the minimum width of the element
lengthExample: min-width:5em - the minimum width is specified as a length type data. The measure units that can be used are:
emcurrent line height
pxpixels
excurrent font x-height
percentageExample: min-height:33% - the minimum width of the element is specified in terms of percentage of the containing element
inheritthe property is inherited from the parent element
orphansused for paged documents - specifies the minimum number of lines of a paragraph that must be left at the bottom of a page (if there is room for less, the entire paragraph is sent to the next page.)
integerExample: orphans:3 - the initial value is 2
inheritthe property is inherited from the parent element
outlinedefine the properties of the element outline. The outline is the space that lies just outside of the border1. Separate values can be defined in the properties:
outline-color
outline-style
outline-width
All the values defined for the latter can be assigned to the 'outline' property.
outline-colorassign a color to the outline.
colorExample: outline-color#DD00DD - the color is a datum of the color type.
invertExample: outline-color:invert - the color is the inverted of the underlying surface
inheritthe property is inherited from the parent element
outline-styledefines the style properties of the outline - this property can have all the values of the border-style property.
outline-widthdefines the width properties of the outline - this property can have all the values of the border-width property.
overflowspecifies if and how the content of the element is clipped if if overflows the box containing the element. the possible values are:
visibleExample: overflow:visible - the content is not clipped, it may be rendered outside the element block box3
hiddenExample: overflow:hidden - the contents are clipped and no scrolling mechanism is provided so that the area outside the clip is not accessible
scrollExample: overflow:scroll - the contents are clipped and a scrolling mechanism is provided
autoExample: overflow:auto - the action is user agent independent - there should be a scrolling mechanism to give access to the overflowed data
inheritthe property is inherited from the parent element
paddingspecifies the width of the padding1 area on the 4 sides.
This can also equivalently defined in the padding-width property.
The width value can be specified as follows:
lengthExample: padding:5px - the width is expressed as a length type datum. The possible measure units are:
emcurrent line height
pxpixels
excurrent font x-height
percentExample: padding:5% - the padding area width is defined as a percentage of the width of the containing element
Using the 'padding' property, different width values can be assigned to the different sides:
- 4 values can be specified, one for each side - the assignment follows this clock-wise order: top-right-bottom-left.
- with 3 values, they are assigned in the following order to: top-right-bottom, the left side is assigned the same value as the right
- with 2 values, the first value is assigned to the top and bottom sides, the second to the right and left
- with 1 value, all 4 sides are assigned this value
The property can also be split into:
- padding-top,
- padding-right,
- padding-bottom,
- padding-left,
with each property independently assigned.
pageidentifies a type of page.
identifierExample: page:narrow - assings an element to the type of page identified by the value of the property
An identifier can only contain letters and digits and the hyphen, and UNICODE characters with code from 161 on. The first character must be a letter.
page-break-afterdefined for a block type element - specifies how a page break can occur after the element
autoExample: page-break-after:auto - neutral: neither forces nor forbids a page break after the element block
alwaysExample: page-break-after:always - always forces a page break after the element block
leftExample: page-break-after:left - forces one or two page breaks after the element block so that the next page is formatted as a left page
rightExample: page-break-after:right - forces one or two page breaks after the element block so that the next page is formatted as a right page
avoidExample: page-break-after:avoid - avoid a page break after the element block
inheritthe property is inherited from the parent element
page-break-beforedefined for a block type element - specifies how a page break can occur before the element
autoExample: page-break-before:auto - neutral: neither forces nor forbids a page break before the element block
alwaysExample: page-break-before:always - always forces a page break before the element block
leftExample: page-break-before:left - forces one or two page breaks before the element block so that the next page is formatted as a left page
rightExample: page-break-before:right - forces one or two page breaks before the element block so that the next page is formatted as a right page
avoidExample: page-break-before:avoid - avoid a page break before the element block
inheritthe property is inherited from the parent element
page-break-insidedefined for a block type element - specifies how a page break can occur inside the element
autoExample: page-break-inside:auto - neutral: neither forces nor forbids a page break inside the element block
avoidExample: page-break-inside:avoid - avoid a page break inside the element block
inheritthe property is inherited from the parent element
positionsets the position of the element in the text flow. An element whose position is modified by this property is called 'positioned'
staticExample: position:static - No action: the element is normal
relativeExample: position:relative - The element block is shifted relative to its normal position in the text flow. The shifted position is determined by the top, bottom, left and right properties. This positioning does not alter the placing of the subsequent elements in the flow, whose positions are the same as if the positioning did not occur.
absoluteExample: position:absolute - the element is taken out of its normal position in the text flow, and placed according to the top, bottom, left and right properties. The element is considered not existing in the current flow so that the subsequent text is placed disregarding the element.
fixedExample: position:fixed - the element is positioned as with the 'absolute' value, but it is fixed:
- on a continuous medium, it is fixed to the viewport and does not move when the document is scrolled
- on a paged medium, it is fixed to the page.
inheritthe property is inherited from the parent element
quotesspecifies the quotes to use before and after en element
noneExample: quotes:none - the open-quote and close-quote values assigned to the before and after pseudo-classes of the element are cancelled: they produce no quotes.
string stringExample: quotes:' " ' ' " ' " ' " " ' " - each string represents a pair of open and close quote sign. When the quoted elements are embedded, tha first pair is used for the outer quotes, the second for the inner.
inheritthe property is inherited from the parent element
rightUsed for a positioned element - specifies the distance between the right edges of the element content1 and the containing element.
The other properties used in this connection are:
- left
- bottom
- top
lengthExample: right:20 - distance expressed as a length data type value
len%Example: right:5% - distance expressed as a percentage of the total element height
autothe distance is automatically determined
inheritthe property is inherited from the parent element
sizedefines the size and orientation of a page box3
lengthExample: size:8.5in 11in - specifying the page size as length type data defines the absolute size of the page. The complete specification is:
width height
where:
width - is the page width described by a number, followed by a unit symbol
height - is the page height described by a number, followed by a unit symbol
The units can be:
in - for inch
cm - for centimeter
px - for pixel (this is the default value)
If only one length is specified, it is the common value of width and height (the page is square)
autoExample: size:auto - the page is adjusted to the target sheet
portaitExample: - overrides target orientation - the page is adjusted to the target sheet dimensions, with the longer side vertical
lanscapeExample: - overrides target orientation - the page is adjusted to the target sheet dimensions, with the longer side horizontal
inheritthe property is inherited from the parent element
table-layoutcontrols the algorithm used to lay out table cells, rows and columns
autoExample: table-layout:auto - use any algorithm
fixedExample: table-layout:fixed - use the fast fixed algorithm that does not depend on the content of the cells
inheritthe property is inherited from the parent element
text-aligncontrols the alignment of text in the element
leftExample: text-align:left - aligns the text to the left
rightExample: text-align:right -fe aligns the text to the right
centerExample: text-align:center - centers the text
justifyExample: text-align:justify - justifies the text (aligns on both side)
stringExample: text-align:'.' - align the text on the specified string - the value used in the example aligns the text on the '.' that can be a decimal point.
inheritthe property is inherited from the parent element
text-decorationspecifies the decoration of the text in the element
noneExample: text-decoration:none - no decoration
underlineExample: text-decoration:underline - underline the text in the element
overlineExample: text-decoration:overline - line of text has a line above it
line-throughExample: text-decoration:line-through - each line of text is struck by a line through its middle
blinkExample: text-decoration:blink - the text is caused to blink (conforming user agents are not require to support this value)
inheritthe property is inherited from the parent element
text-indentdefines the indentation of the first line in a block element.
lengthExample: text-indent:20 - specifies the absolute indentation value as a length type data. The measurement unit is one of the following:
em - line height
px - pixels (this is the default value)
ix - current font x-height
percentExample: text-indent:5% - specifies the text indentation as a percentage of the total line width
inheritthe property is inherited from the parent element
text-shadowdefines a shadow for the text in the element
noneExample: text-shadow:none - no shadow
lngth lngth lngthExample: text-shadow: 3px 3px - defines the shadow with 3 length data type values:
- the horizontal distance to the right from the text - if negative, the shadow is to the left
- the vertical distance below the text - if negative, the shadow is above
- an optional blur radius that introduces a blur effect
colorExample: text-shadow:blue - specifies a color for the shadow effect - if used, is added to the above, in a space separated list
inheritthe property is inherited from the parent element
text-transformcontrols the capitalization effect of the element
noneExample: text-transform - no capitalization effect
capitalizeExample: text-transform:capitalize - Sets the first character of each word in upper case
uppercaseExample: text-transform:uppercase - Sets all the letters in the element in uppercase
lowercaseExample: text-transform:lowercase - Sets all the letters in the element in lowercase
inheritthe property is inherited from the parent element
topUsed for a positioned element - specifies the distance between the top of the element content1 and the top of the containing element, which is at the top edge of its top-margin.
The other properties used in this connection are:
- left
- right
- bottom
lengthExample: top:20 - distance expressed as a length data type value
len%Example: top:5% - distance expressed as a percentage of the total element height
autohte distance is automatically determined -- this is the initial value
inheritthe property is inherited from the parent element
unicode-bidihandles bidirectional text
normalExample: unicode-bidi - the element does not open an additional level of embedding with respect to the bidirectional algorithm.
embedExample: unicode-bidi - if the element is inline-level, this value opens an additonal embedding level with respect to the bidirectionel algorithm
bidi-overrideExample: unicode-bidi:bidi-override - if the element is inline-level or a block-level element that contains only inline elements, this value creates an override
inheritthe property is inherited from the parent element
vertical-aligndefines text vertical alignment in a block-level element
baselineExample: vertical-align:baseline - align the base line text with the base line of the element
middleExample: vertical-align:middle - align the midpoint of the text box with the base of the element plus half the x-height of the font
text-topline Example: vertical-align:text-top - align the top of the text box with the top of the element font
text-bottom Example: vertical-align:text-bottom - align the bottom of the text box with the bottom of the element font
subExample: vertical-align:sub - lower the baseline of the text to the subscript position
superExample: vertical-align:super - raise the baseline of the text to the superscript position
percentageExample: vertical-align:20% - raise (positive value) or lower (negative value) the base line of the text by the specified percentage of the line height
lengthExample: vertical-align:5 - raise (positive value) or lower (negative value) the base line of the text by the quantity specified
The quantity is specified by a length data type value.
The measurement units can be:
cm - centimeters
em - line height
px - pixels (this is the default value)
ex - current font x-height
topExample: vertical-align:top - align the top of the text box with the top of the line
bottomExample: vertical-align:bottom - align the bottom of the text box with the bottom of the line
inheritthe property is inherited from the parent element
visibilityspecifies wheter the element is visible
visibleExample: visibility:visible - the element is visible
hiddenExample: visibility:hidden - the element is invisible
collapseExample: visibility:collapse - in a table, removes the element from display - elsewhere, has the same effect as hidden
inheritthe property is inherited from the parent element
white-spaceindicates how user agents are to handle white-space and line breaks in the element
normalExample: white-space:normal - normal handling: consecutive white space characters (including CRLF) are to be replaced by a single space - line breaks are introduced to fit the text into the element box
preExample: white-space:pre - white space is displayed as is, line breaks are controlled by the CRLF characters or BR elements contained in the text - the user agent does not break lines at the end of the display area
nowrapExample: white-space:nowrap - white space is collapsed into a single space, as in the 'normal' case, but as in the 'pre' case, no line break is generated - line breaks are controlled by the BR elements contained in the text
inheritthe property is inherited from the parent element
widowsused for paged documents - specifies the minimum number of lines of a paragraph that must be displayed at the top of a page.
integerExample: widows:3 - the initial value is 2
inheritthe property is inherited from the parent element.
widthspecifies the content area3 width of a block element
lengthExample: width:250px - absolute width, expressed as a length data type value. Some of the possible measurement units are:
cm - centimeters
em - line height
px - pixels (this is the default value)
ex - current font x-height
percentageExample: width:50% - relative width, expressed as a percentage of the containing element width
autoExample: width:auto - width is determined by the user agent taking into account information from the environment.
inheritthe property is inherited from the parent element
word-spacingspecifies the spacing values between words
normalExample: word:spacing:normal - normal word spacing, as defined by the current font or the user agent.
lengthExample: word-spacing:1 - specifies the space to be added to the normal spacing beteween words. If no unit is specifies, the default is "pixels".
inheritthe property is inherited from the parent element
z-indexUsed for positioned elements - specifies the element stack level
The stack level value is an integer starting at 0. An element with the larger stack level overlays an element with a smaller stack level.
autoExample: z-index:auto - the stack level of the element is the same as its parent's - the element does not establish a local stack
integerExample: z-index:2 - the element is assigned the specified stack level. It estabishes a local stack in which its stack level is 0.
inheritthe property is inherited from the parent element
 
NOTES

TOP
contents introduction reference index  previous  next