Remember Me
forgot your password?

What are Cascading Style Sheets (CSS)

Cascading Style Sheets, also known as CSS, are the most popular and neat way of formatting an html page.

There are two versions of Cascading Style Sheets (CSS). CSS Level 1 was launched in 1996 and is supported by all browsers. This version is the older of the two and is used mostly for font formatting, text alignment and line spacing.

CSS version 2 came out in 1998. This one is a lot more powerful than its predecessor allowing you not only to format text but also to position elements on your web page. This version of CSS is so powerful that all good web designers use it instead of using html tables.

The word Cascading reflects how style sheets work. An Html document can be linked to several style sheets, for example it could be linked to 2 sheets, an internal style sheet (styles within the head tag of a html document) and an external style sheet (a .css document).

An important aspect of Cascading Style Sheets is the operation of inheritance. If a certain aspect of formatting is not specified for a child element, it will inherit the formatting of its parent element.

When you use CSS, you can avoid the use of most html format tags making your code much easier to read. Here’s an example:

If we want to have a Blue size 12pt title at the start of a every article on our web site we would have something like this in our html code:

title

You might be thinking “that doesn’t look too bad”… but what happens if you have 50 titles throughout your site? You would have to repeat this process over and over again, and you will be at risk of using different formats for your titles and by doing so breaking the consistency of your design. Not only that, if you decide to change the color or font of all your titles you would have to go through the process of changing all 50 font tags…

Here’s when CSS comes in handy!!! Instead of using font tags for my titles I would use this:

In a separate .css document I would add a new style called “titles”. It would look something like this:

.title { font-size 12pt; color:blue;}

and in my html I would replace my font tags with:

Title

And voila!!! All titles that are within the titles class will be formatted in the same way. The beauty of style sheets is that they can be linked to as many web pages as you want making the whole process of adding more content to you site a whole lot easier.

Sebastian

Sebastian De Masi is the Founder of 06WebDesign.com. 06WebDesign.com provides resources to help you create an effective and lucrative online solution for your business and establish an online presence amongst the most reputable companies World wide.

For more information visit http://www.06webdesign.com

Rate this Article: 0 / 5 stars - 0 vote(s)
Print Email Re-Publish


Article Source: http://www.articlesbase.com/programming-articles/what-are-cascading-style-sheets-css-185858.html
Add new Comment



Captcha

  • Latest Programming Articles
  • More from Sebastian

Hire PHP developer – Hire web developers for cost effective web development

By: Rightway Solution | 06/07/2009
Rightway is a leading web application development and software development company. We offer Hire Web Developers Services that enables you to have one or more Dedicated Developer(s) to work solely for you, on your projects.

Your Website – Custom Designed or Template?

By: SearchPooch.com | 04/07/2009
A quick Internet search will reveal the tens of thousands of people out there all wanting to make a better website for you. They range from sites where you do the work with the help of a template, to those that offer a one-off custom-built design. The former are usually “free”; the latter may cost more or less depending on the skills of the designer, and how much they think they can charge their customers.

Hire ASP Dot Net Programmers:Hire php developers

By: Arshad | 03/07/2009
Since the concept of outsourcing changed the economy of many countries it has been very clear that paying Indian development service providers is very much economical than funding an in-house private team. Analysis says that more than 50% of the cost can be saved by inking contracts with Indian IT service providers.

Virtual assistant services

By: Arshad | 03/07/2009
Virtual assistant services are those which handle the administrative and technical aspects of your growing business from a remote location. With the help of all the latest technologies it is possible for skilled people all around the world to assist their clients in a very similar and efficient way as a home full time assistant would do. The good thing about virtual assistant service is that they are much more affordable than hiring a home assistant.

Creative Web Development in India

By: Shoun | 03/07/2009
Perception system has vast experience in website designing and website developing. It has team of young web designers and developers who are always create new and remarkable for their clients. Visit http://www.perceptionsystem.com/ for further assistance.

Mostly used programming languages and their programming advantages

By: Joanna Gadel | 02/07/2009
PHP programming, Java programming and Dot Net programming are the three widely used languages in recent web programing as well as in software programing arena. This article describes the reasons of their vast use and the advantages in terms of their features and application procedures.

Web Developement and Web Design Company in india

By: Ashutosh | 02/07/2009
NSG Infotech is a growing company in india, working on diffrent technologies like Miscosoft Technologies and Open source technologies

Introduction to Black Box Testing Techniques

By: yogindernath | 02/07/2009
Introduction to Black Box Testing Techniques

History of the Internet

By: Sebastian | 30/07/2007 | Internet
The main goal of this system was to provide a stable communication network that would work even if some of the sites were destroyed in case of a nuclear attack. Unlike the current browsing, the internet back in the early stages could only be used by computer experts and highly qualified professionals such as engineers, scientists and librarians.

Increase the Number of Targeted Traffic in a Day Using Free Services

By: Sebastian | 29/07/2007 | Online Promotion
Would you believe me if I told you that there is a way to start getting targeted visitors today… and without spending a cent?

How to Reach Qualified Prospects Through your Website

By: Sebastian | 22/07/2007 | Online Promotion
Without traffic you will never make money, simple as that!!! There are many ways of driving traffic to your website. Here’s a list of the most popular and effective methods:

Web Design to Boost your Business

By: Sebastian | 22/07/2007 | Online Business
The first thing you must do before building a website is to identify your market and their needs. Once done its time to develop an online presence on the internet.

How to Design a Lucrative Online Business

By: Sebastian | 22/07/2007 | Online Business
Thanks to the easy accessibility and affordability of the internet, electronic commerce has dominated the marketing practice. With very little knowledge now a person can setup their very own online business in days and start selling products to clients even in the most remote areas of the planet.

Increase your Targeted Traffic by Offering Free Content

By: Sebastian | 22/07/2007 | Online Promotion
If you want to build targeted traffic to your site you have to think outside the box. Search Engine Rankings and Advertising campaigns are not the only ways to drive people to look at you site. By adding free downloads you will attract visitors by hundreds, if not thousands.

How to Appear in Google on Days

By: Sebastian | 11/07/2007 | SEO
I was comparing different methods to build traffic and I came across one that worked wonders for me and it’s absolutely free!!!

Submit Your Articles Free: Signup


Article Categories




Use of this web site constitutes acceptance of the Terms Of Use and Privacy Policy | User published content is licensed under a Creative Commons License.
Copyright © 2005-2008 Free Articles by ArticlesBase.com, All rights reserved. (0.33, 7)