Text which is intended to be displayed with borders, in a box or with a coloured background in print or electronically should be tagged as follows in DTD 4 XML.
The border attribute of the subsection element is used to indicate that a section of text should be displayed in a frame or box.
Note: Netscape does not display the borders in these examples correctly (2001-01-15)
The attribute values for border are based on HTML4 table frame attribute values.
| This text has a left-hand border. The markup would be: <subsection border="lhs"><p>...</p></subsection> |
| This text has a right-hand border. The markup would be: <subsection border="rhs"><p>...</p></subsection> |
| This text has a top border. The markup would be: <subsection border="above"><p>...</p></subsection> |
| This text has a bottom border. The markup would be: <subsection border="below"><p>...</p></subsection> |
| This text has a top and bottom border. The markup would be: <subsection border="hsides"><p>...</p></subsection> |
| This text has left and right side borders. The markup would be: <subsection border="vsides"><p>...</p></subsection> |
| This text appears within a box. The markup would be: <subsection border="box"><p>...</p></subsection> |
If a section of text is intended to be displayed with a tinted or coloured background the bgcolor attribute of subsection can be used.
|
This section of
text appears with
a grey background.
The markup would be
<subsection bgcolor="#EEEEEE"><p>...</p></subsection> |
Frames and background colours can be combined:
|
This section of
text appears with
a grey background.
The markup would be
<subsection bgcolor="#EEEEEE" border="box"><p>...</p></subsection> |