HTML and CSS Reference
In-Depth Information
Figure 5-31
Plan
Ahead
Planning an external style sheet.
The home page is complete, but some style details are lacking. It is important to maintain a
consistent look across a Web site. By creating an external style sheet, you can maintain that
consistent look with great style.
Determine what styles you want to use.
As you have seen, there are many styles that
you can use to enhance your Web site (see Appendix D). Some that you can utilize in this
Web site are:
° Font family - maintaining a consistent font family is very important because the style
of font is what you see the most across a Web site.
° Font size - for the same reason as above, you should maintain consistency in font size;
there are exceptions to this, especially in titles on the Web page.
° Margins - it is helpful to utilize margins to help define the structure of a Web page.
° Borders around links - you do not always want to see borders around images that you
use as links; setting the border to zero is sometimes better style.
° Determine if you need to add any classes. If there is code that will be repeated across
Web pages, you should add a class to the external style sheet and use the class name
in the HTML files. If you want to make a change across a Web site (such as font color),
it is much easier to do that one time in an external style sheet rather than changing it
multiple times in many Web pages.
Search WWH ::




Custom Search