Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mislz28/public_html/wp-content/themes/css-faq-v2/timeweather/timeweather.php on line 19
  • CSS Faqs
30 June 2008

Using Cascading Style Sheets (CSS)

Cascading Style Sheets are highly recommended in setting the appearance of HTML pages. HTML is suitable for defining the basic element structure of your website (<h1>, <p>, <li>, and so on). On the other hand, CSS is most advisable for styling the appearance of elements (bold heading, Arial font, indented paragraphs, and so on).

The advantages of using CSS include:
Easier Maintenance
You will find that it is simpler to maintain a website’s appearance using CSS. A single CSS file updating a site’s overall look is simpler than the conventional use of HTML formatting elements.

Better Functionality
CSS defines the appearance of printed HTML pages, giving richer functionality.

Greater Accessibility
CSS allows differently abled users to change a web page’s appearance to meet their special needs. With CSS, web pages could be easily rendered by special devices, including speaking browsers and PDAs.

Disadvantages of CSS

Cascading Style Sheets also has its share of disadvantages. For instance, legacy browsers like Netscape 4 do not readily support CSS codes. The good news is, such browsers now pose only a minor problem to the implementation of CSS.

CSS Approaches

CSS could be applied in three ways:

External CSS Files
This is the most recommended way to employ CSS. Store the CSS information in an external file, which would then be linked to the targeted file using the <link> element in HTML. This method enables the application of CSS declarations on every web page.

Internal CSS
This method entails the storing of CSS data within your HTML by adding it to the <style> element inside the section at the beginning of your HTML. Take note that this method is best only if you wish to re-format a single page.

Inline CSS
Inline CSS requires you to embed CSS codes alongside your HTML elements. For example,

used CSS to define the text in this paragraph as maroon. The command will only be carried out on the targeted paragraph. This approach is not recommended.

You Validate Your CSS
Do not forget to validate your CSS as with your HTML. Here are a number of approaches to ensure that your CSS meets the correct standards:

Within HTML Editor:
You could also use your HTML editing tool to develop CSS. If this is so, try looking for its CSS validator.

Within a dedicated CSS editor:
If you are using a dedicated CSS editor, it may also have a validator.

Using an external CSS validator:
You may also opt to use an external CSS validator. Install this tool locally or online as
could be found at W3C and the Web Design Group.

Tags:

This entry was posted on 30 June 2008 at 7:47 PM and is filed under CSS Faqs. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment