Appendix A. CSS Quick Reference

Although this appendix can’t replace a comprehensive examination of cascading style sheets, I wanted to give you a way to quickly check the anatomy of the most common CSS code. I’m also providing a compatibility table for the most common CSS attributes.

Adding Styles

Styles can be added to a Web page in a variety of ways:

Inline

Inline styles are applied directly to HTML tags through the style attribute (Figure A.1). They are the last styles considered in the cascade order, so they are useful for over-riding other styles.

Anatomy of an inline style.

Figure A.1. Anatomy of an inline style.

Internal

Internal styles are set in the <style> tag, generally ...

Get DHTML and CSS: Advanced Visual QuickPro Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.