css
From Textpattern CMS User Documentation
<txp:css />
The basic css tag is a single tag and used to output the URL of the style sheet assigned in the Sections tab.
Contents |
Attributes
Tag will accept the following attributes (case-sensitive):
- format="value"
- How to format output: either return complete HTML link tag with necessary HTML attributes, or only the StyleSheet's URL. Available values are
linkorurl. Default isurl. - media="value"
- HTML media attribute to be applied to link tag (when invoked with
format="link"). Default isscreen. - name="style name"
- Link to specified style.
- rel="value"
- HTML rel attribute to be applied to link tag (when invoked with
format="link"). Default isstylesheet. - title="value"
- HTML title attribute to be applied to link tag (when invoked with
format="link"). Default is unset.
Examples
Example 1: Output the link to the section's default style sheet
<head> <!-- ...tags... --> <txp:css format="link" /> <!-- ...more tags... --> </head>
Example 2: Output the link to a named style sheet
<head> <!-- ...tags... --> <txp:css format="link" name="style_name" /> <!-- ...more tags... --> </head>
Example 3: Output print and alternate style sheets
<head> <!-- ...tags... --> <txp:css format="link" name="plain" rel="alternate" title="Plain and Simple Style" /> <txp:css format="link" name="glossy" rel="alternate" title="Glossy Style"/> <txp:css format="link" name="print" media="print" /> <!-- ...more tags... --> </head>
Genealogy
Version 4.3.0
-
nattribute deprecated and renamedname
Version 4.0.4
-
format,media,rel,titleadded.




