The internet is still relatively new, and web design practices and principles are constantly changing and evolving. Thankfully, we’ve seen a lot of improvements since the early days of the web. We’ve come from basic HTML pages to being able to design beautiful, complicated web pages easily and quickly using CSS. Let’s take a look at how CSS has improved and changed web design from the early days in which HTML was the only language used.
Writing the design elements of a site in HTML was tedious and required lots of work and repetition. The overall layout of various elements was usually done with tables, which was the easiest way to get elements to appear side by side. Otherwise, everything had to be stacked, and pages would be very long and narrow. Stylistic elements, like font, size, and color had to be done with the now depreciated font tag and various tag attributes. These would have to be declared every time you wanted to apply a certain style. This could get incredibly repetitive, especially on larger sites, and wasted a lot of time. Also, if a site design had to be changed, each individual page would have to be modified.
Cascading Style Sheets, or CSS, was invented to improve this process. CSS allows one single page of code to be used to control the style and layout of many different HTML pages. Each HTML page only has to reference the CSS file with a link tag in the header. Rather than using lengthy font declarations each time you want to use a certain style, you simply have to add a certain class or id attribute to a tag to give it a predetermined style.
CSS can also control the layout of a page, using div tags. A div is an arbitrary distinction that can be placed anywhere in a page to divide it into sections. The position of these sections can then be controlled using CSS properties such as float: left or position: absolute. These can also be used to give multiple pages the same styling and layout without having to copy the style. The CSS style can then be modified, and each page that references that CSS files will change.
CSS has drastically changed and improved the way websites are designed, and has made the process much quicker and easier. CSS has come so far that it is now considered bad form to use HTML tables to create a page layout. CSS is a great and easy way to design a website.