Keep this in mind as you advance through the rest of this unit, as the reasons for this will become more clear as you come to understand the "cascading" nature of "Cascading Style Sheets." Also try using two or more of these techniques to modify the same version of your "index.htm" file - you will likely have unexpected results if your styles conflict. This is particularly true if you are working with existing websites that may more than one of these techniques, or if you are using a content management system that prevents you from linking to external style sheets.įor the purposes of learning these different techniques, create a few copies of "index.htm" in different directories and try using the techniques you have learned in this unit to modify the presentation of your paragraphs and headings using each technique. While we have already created an example of "external" or "linked" CSS (which is generally the best practice for web coding), it is important for you to be able to distinguish between inline, embedded, and external use-cases of CSS. We have already learned in sub-subunit: 1.3.3 Applying CSS to HTML that there are three different ways of applying styles to HTML. In these cases, using tables to organize content is fine. That said, in some Content Management Systems, tables may be the only convenient way to organize content in an HTML file. Instead, tables should be used for semantic information - that is, to designate a part of an HTML file as tabular data, rather than to specify how that data is presented. In conceptual terms, the reason for this is that using tables to organize content is effectively a use of HTML for presentational information - which is CSS's job. Generally speaking, this is a use-case for tables that has been superseded by the use of CSS to position and organize content and should be avoided. In this chapter, Mobbs notes that tables can also be used to structure the elements of a webpage, since you can include images, paragraphs, and many other elements inside each cell. This use-case is extremely helpful for users, as it makes information easy to locate and see.
Tables are used on the Web in much the same way that they are used in word processing: to present tabular data.