Go to TopContent and Style

Let me assume that you are looking at this site in a recent version of Internet Explorer or Firefox. From the menu select VIEW > (PAGE) STYLE > NO STYLE. What you see now is the basic content of the page, displayed using the browser's default styling rules. This shows larger text where it has been marked as a main, second or third level heading, bullets where it is marked as a list, with the rest being shown in standard paragraphs. The various images that will be displayed on the page are also seen with everything running down the page in the order that it appears in the HTML file.

Return to the DEFAULT STYLE/BASIC PAGE STYLE to see the page displayed as intended. What you see is that same content, but rendered according to the author's styling wishes (but, as always, subject to any options you may have set in your browser).

Go to TopThe Four Methods for Styling Content!

Many new web designers have not encountered "styles" in their use of word processing or desk top publishing programs and they find it a completely new concept. However, the principle is easy to understand. Content and styling are separated.

When creating the page you simply tag each part of the text as a heading, paragraph, list, etc and the browser follows rules for displaying this type of content.

External Stylesheet

The external stylesheet is the preferred approach to styling content and should be the approach that you adopt. All pages in the site are linked to the same styling instructions, or Cascading Style Sheet, file. In this way all pages follow your house style for the site and should you change your mind about any styling feature, a change to the CSS file ensures that the next time any page is loaded it will be displayed showing the new styling features.

NOTE: KompoZer uses the term "Linked Stylesheet" for what is described on this site as an "External Stylesheet".

Internal Stylesheet

In addition to an external stylesheet, styling instructions can be grouped together in a block and embedded in the current HTML file. This prevents site-wide updating of styles and should only be used where there is a unique feature on a page that will not be used on any other page on the site.

NOTE: Some exercises on this site use an internal stylesheet. This should not be your normal practice for a live site. It is done only so it is easy to send me a problem file for analysis.

Inline Styles

If you continue to use the traditional techniques for styling, of dragging across some text and clicking a toolbar button then, by default, KompoZer will generate an "In Line" style. Use of in line styles is, generally, to be condemned. Only use them for a unique feature that is not repeated either on the page or anywhere else on the site.

Obviously, a style will always be unique the first time you use it. However, frequently, as a site expands, the new feature will be repeated. Accordingly, the wise author's instinct is to assume any newly created style will need to be used again at some point and will always add it to the stylesheet.

HTML Attributes

If you have changed one of the "General" settings in KompoZer options then the program can be switched to using a twenty year old method of in line styling. The option is there for historical reasons only. Even if editing a site as much as ten years old you should still not clear the check box the "Use CSS styles instead of HTML elements and attributes".

Go to Top Page updated: 3 July 2010