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
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.



(1 votes, average: 4 out of 5)
english
español
Deutsch
français
Italiano
Português
русский










Leave a reply