The Dreamtech company logo that has a dark blue computer monitor clipart accompanied by the company name, Dreamtech Computing.

773-123-1234
info@dreamtechcomputing.com

CSS

CSS stands for Cascading Style Sheet which is used to describe the style/presentation of a document written in a markup language. CSS was first developed in 1997, as a way for Web developers to define the look and feel of their Web pages. It’s most common application is to style web pages written in HTML and XHTML, but the language can be applied to any kind of XML document. CSS is designed primarily to enable the separation of document content from document presentation, including aspects such as the layout, colors, and fonts. This separation can improve content accessibility provide more flexibility and control in the specification of presentation characteristics. CSS makes it possible to separate presentation instructions from the HTML content in a separate file or style section of the HTML file. The CSS specifications are maintained by the World Wide Web Consortium (W3C). W3C also provides a validation service for css documents.

 

Why is CSS Important?

The main purpose of using Cascading Style Sheet is to define styles for your html documents, including the design, layout and variations in display for different devices and screen sizes. CSS is one of the most powerful tools a Web designer can learn because with it you can affect the entire mood and tone of a Web site. Well written style sheets can be updated quickly and allow sites to change what is prioritized or valued without any changes to the underlying xhtml. CSS can cascade, combine, and browsers interpret the directives differently, CSS is more difficult than plain HTML. But once you start using it, you'll see that harnessing the power of CSS will give you more options and allow you to do more and more things with your web sites.

 

Example of CSS

body{color:#000000;}
.header{font-family:Arial Black;color:#ff0000;border:solid 5px;width:300px;}
.mainnav{font-family:verdana,helvetica;color:#cc0000;font-size:14px;border-color:#cc0000;}

 

How to use CSS?

You can place your CSS in the head of a document with an embedded style sheet, or attach aseparate file that defines your styles with an external style sheet. Mainly there are two ways to use CSS in your documents:

  • External link: In external link, we create a separate CSS file that defines the display of the documents, and link it to the html file with external link. In this type link, we place the link in the head of the document.
  • Internal link: In this link, we place the CSS in the head of the document with an embedded style sheet.

 

Return to Web Development

A small and black icon of the letter f representing facebook that takes you to Dreamtech Computing's Facebook page. A small and black icon of a bird representing twitter that takes you to Dreamtech Computing's twitter page. A small and black icon of a rectangular play button representing Youtube that takes you to Dreamtech Computing's Youtube page.

Fictitious website designed by Dreamtech Computing