9
2011
Use of CSS in Website Design
CSS stands for Cascading Style Sheets. CSS defines how HTML elements are to be displayed.
CSS Syntax
A CSS declaration always ends with a semicolon, and declaration groups are surrounded by curly brackets as shown below:
h1 {Color: orange; font-size:14px;}
A CSS rule has two main parts: a selector, and one or more declarations:
The selector is normally the HTML element we want to style. Each declaration consists of a property and a value.
The property is the style attribute you want to change. Each property has a value.
In the above syntax,
h1 is a Selector.
Color is a property and orange is a value. This is a declaration.
Similarly, font size is a property and 14px is its corresponding value.
CSS Comments
We use Comments to explain our code, and may help you when you edit the source code at a later date. Comments are ignored by browsers.
A CSS comment begins with “/*”, and ends with “*/”
Use of CSS in web design is one of the prime tasks for any company in this field. It is necessary that People first plan up an appropriate way to develop a web page and then to start with the actual website design. Only then can they get a fruitful result. We often find that a page that could be given far more simple and decent look without any complicate coding is coming up jumbled and gaudy in front of the viewers thus creating a dull impression. The developer might have worked hard in the development of the website page, but has hardly any impact on the user. With the help of CSS, styling can be done. This can be done as per the requirement of the clients. Coding may focus the skill of a developer but it becomes totally useless in actual implementation unless proper design is done. A website design company should take care of the prime demands of a web page before putting requisite styling by means of CSS.
Use of CSS development is done to give HTML more flexibility in the matter of styling and positioning. This helps in overcoming the limitations of HTML But HTML definitely stands as the basement on which the total structure of advanced web page coding stands. As per the client requirement, any web page should be viewed in the simplest way possible and if necessary, coding by CSS is to be done. We cannot do anything without proper planning. So firstly a web developer should make a simple web page using HTML.
There are certain things that create more and more errors if we go on placing CSS randomly.
- After a page is developed in HTML, the positioning by CSS should be included. Also, the position and z-indexing should be done with proper planning.
- The placement of Ids within a particular span class often makes the coding confusing and erroneous. The ID class is to be placed after the page is designed in basic HTML. Above all, unnecessary span class should be avoided.
- The external style sheet should be implemented only if required else it will simply make the web page development quite clumsy. Developer should use the Ids with accuracy else a bunch of errors may arise when the page is uploaded.
Id selector in CSS:
Class ID is defined as “a unique identifier to an element”. CSS IDs are similar to classes in that they define a special case for an element.

An article by Mindscreen






