[ Pobierz całość w formacie PDF ]
"alternate" keyword for the rel attribute.
Link: ; rel="stylesheet"; title="compact"
Link: ; rel="alternate stylesheet"; title="big print"
This should also work when HTML documents are sent by email. Some email
agents can alter the ordering of [RFC822] [p.356] headers. To protect against this
affecting the cascading order for style sheets specified by Link headers, authors
can use header concatenation to merge several instances of the same header field.
The quote marks are only needed when the attribute values include whitespace. Use
SGML entities to reference characters that are otherwise not permitted within HTTP
or email headers, or that are likely to be affected by transit through gateways.
LINK and META elements implied by HTTP headers are defined as occurring
before any explicit LINK and META elements in the document s HEAD.
24 Dec 1999 18:26 194
Alignment, font styles, and horizontal rules in HTML documents
15 Alignment, font styles, and horizontal rules
Contents
1. Formatting . . . . . . . . . . . . . . . . 195
.
1. Background color . . . . . . . . . . . . . 195
.
2. Alignment . . . . . . . . . . . . . . . 195
.
3. Floating objects . . . . . . . . . . . . . . 197
.
Float an object . . . . . . . . . . . . . 197
.
Float text around an object . . . . . . . . . . 198
.
2. Fonts . . . . . . . . . . . . . . . . . 199
.
1. Font style elements: the TT, I, B, BIG, SMALL, STRIKE, S, and U elements
199
2. Font modifier elements: FONT and BASEFONT . . . . . . 200
.
3. Rules: the HR element . . . . . . . . . . . . . 202
.
This section of the specification discusses some HTML elements and attributes
that may be used for visual formatting of elements. Many of them are deprecated
[p.38] .
15.1 Formatting
15.1.1 Background color
Attribute definitions
bgcolor = color [p.51] [CI] [p.49]
Deprecated. [p.38] This attribute sets the background color for the document
body or table cells.
This attribute sets the background color of the canvas for the document body (the
BODY element) or for tables (the TABLE, TR, TH, and TD elements). Additional
attributes for specifying text color can be used with the BODY element.
This attribute has been deprecated [p.38] in favor of style sheets for specifying
background color information.
15.1.2 Alignment
It is possible to align block elements (tables, images, objects, paragraphs, etc.) on
the canvas with the align attribute. Although this attribute may be set for many
HTML elements, its range of possible values sometimes differs from element to
element. Here we only discuss the meaning of the align attribute for text.
Attribute definitions
195 24 Dec 1999 18:26
Alignment, font styles, and horizontal rules in HTML documents
align = left|center|right|justify [CI] [p.49]
Deprecated. [p.38] This attribute specifies the horizontal alignment of its
element with respect to the surrounding context. Possible values:
left: text lines are rendered flush left.
center: text lines are centered.
right: text lines are rendered flush right.
justify: text lines are justified to both margins.
The default depends on the base text direction. For left to right text, the default is
align=left, while for right to left text, the default is align=right.
DEPRECATED EXAMPLE:
This example centers a heading on the canvas.
How to Carve Wood
Using CSS, for example, you could achieve the same effect as follows:
How to Carve Wood
H1 { text-align: center}
How to Carve Wood
Note that this would center all H1 declarations. You could reduce the scope of the
style by setting the class attribute on the element:
How to Carve Wood
H1.wood {text-align: center}
How to Carve Wood
DEPRECATED EXAMPLE:
Similarly, to right align a paragraph on the canvas with HTML s align attribute you
could have:
...Lots of paragraph text...
which, with CSS, would be:
How to Carve Wood
P.mypar {text-align: right}
...Lots of paragraph text...
24 Dec 1999 18:26 196
Alignment, font styles, and horizontal rules in HTML documents
DEPRECATED EXAMPLE:
To right align a series of paragraphs, group them with the DIV element:
...text in first paragraph...
...text in second paragraph...
...text in third paragraph...
With CSS, the text-align property is inherited from the parent element, you can
therefore use:
How to Carve Wood
DIV.mypars {text-align: right}
...text in first paragraph...
...text in second paragraph...
...text in third paragraph...
To center the entire document with CSS:
How to Carve Wood
BODY {text-align: center}
...the body is centered...
[ Pobierz całość w formacie PDF ]