While CSS won't change the way a screen reader reads the page, to a sighted person, it can have a large impact on usability. There are some general things to keep in mind when designing a site with CSS.
As a best practice, the font-family property should hold several font names as a "fallback" system, to ensure maximum compatibility between browsers/operating systems. If the browser does not support the first font, it tries the next font. The following is an example of how to add fallback fonts
body {font-family: Arial, Helvetica, sans-serif;}
As a we have just learned, adjusting the default margins can increase the legibility of your sites. To begin, here is an example of adding a margin to a page's body element. We can create room between the top, right, bottom, and left edges of the browser window and content of a site:
body {margin: 40px 40px 40px 40px;}Order of numbers address top, right, bottom, and left (The acronym TRBL or trouble can help you remember this order).
Here is an example of how you can make all headings level one and two centered:
h1, h2 {text-align: center;}
Here is an example of how you can make the background black and h1, h2, and paragraph text yellow:
body {background-color:black;} h1, h2, p {color:yellow;}
Here is a CSS formula for how you can make paragraph text with an ID "message" hidden:
#message { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }