HTML and CSS Reference
In-Depth Information
<p style="color = 'green'; fontWeight = 'bold'">
creates a green, boldfaced text paragraph. Notice first that you need
to enclose inline style values within single quotation marks, not double
quotation marks, as you might use for document-level and external JSS
styles. This is reasonable because the style attribute value itself must
be enclosed in double quotation marks.
Also note that inline JSS definitions use only the property name, not the
containing tag object that owns the property. This makes sense because
inline JSS styles affect only the current tag, not all instances of the tag. JSS values
In general, all of the values you may use for CSS you may also use
in JSS definitions. For keyword, length, and percentage values, simply
enclose the value in quotes and use it as you would any string value
in JavaScript. Thus, the CSS value bold becomes "bold" or 'bold' for
JSS document-level or inline styles, respectively; 12pt in CSS becomes
'12pt' or "12pt" in JSS.
Specify color values as the color name or a hexadecimal color value, en-
closed in single or double quotes. JSS does not support the CSS decimal
red, green, and blue (RGB) notation.
JSS URL values are strings containing the desired URL. Thus, the
( )
' ht-
tp:// '
" ht-
tp:// " at the document level.
One unique power of JSS is that any value can be computed dynamically
when the browser processes the document. Instead of statically specify-
ing the font size, for example, you can compute it on the fly:
tags.P.fontSize = favorite_font_size();
Search WWH ::

Custom Search