- Translation Disclaimer
- Privacy on the Web
- Suggested Tools
- Trademarks and Copyrighted Images
- Vendor Certification
- Consistent Content and Style
- Best Practices
- Making content accessible
- Back to Consistent Content and Style
Cascading Style Sheets (CSS)
Common Methods to Apply Styles to Content
Inline: This method is discouraged and is incompatible with XHTML Strict document types. This method is only acceptable on older web pages that have not been brought up to standard.Inline styles are inserted within a specific HTML tag and the results are specific to a single instance of an object (a line of text, a specific graphic, etc.).
Internal: This method is discouraged and is incompatible with XHTML Strict document types. This method is only acceptable on older web pages that have not been brought up to standard.Internal styles are typically used when a style is specific to more than one piece of content in an HTML page. Styles in an internal page are defined in the HEAD of an HTML document.
External: This is our current standard and the only acceptable method for applying styles to our modern websites.The style sheet is defined as a separate document and a link to the sheet is defined in the HEAD of each HTML document that uses it. All styles and formatting are contained within the external CSS file. This method allows the styles to be modified at once and provides consistency by affecting all pages, templates and sites that are linked to that style sheet. The style sheet is loaded once when visitors first open the site then the same page in the cache is reused on each subsequent page.
Mobile Devices and Printing
To alter the layout for mobile devices and printing, a dedicated CSS file must be used.