Homepage

Why Should You Use CSS?

The CSS tag is one of the core elements of Cascading Style Sheets. CSS is essentially an add on to a document or webpage that can separately describe how it should appear or how it might format in the browser. The CSS tag is used to apply some semantic functionality to your web content.

For instance, a CSS tag might specify that the a href link, or the link tag in a webpage, will use various colors depending on whether the user has already visited the link destination. These anchor links use css anchor tags to specify the specific color for a link, a visited link, a link your cursor is hovering over and a link that is currently being clicked. All of these normal html interface elements can change depending upon the user interaction. By default, there are standard colors and interactions that your web browser presents, but using the proper CSS tag can alter any of the interactions.

Besides the simple example of using a CSS tag to affect a links color, it can be used to alter the entire page display. For example, certain tags can affect layout for a page when it is viewed on a smaller device or on a phone screen. Some websites have CSS tags that will increase font sizes for the visually impaired. The possibilities can be pretty endless when you consider that every display element and presentation technique can be altered through the use of CSS tags.

CSS has become a web standard, but the evolution was created by a need to separate the display formatting from the underlying code. When the presentation was “hard coded” into the page, you did not have the flexibility to make widespread changes to your content either. For example, if you wanted to update the footer on your website, you could affect every page if it referenced a common CSS style or CSS tag. If it was a part of the page html though, you would then have to update every single page.