CSS Guide Part 1. What Exactly Is CSS And How To Use It

Posted by TotalDC

Previously I talked about HTML (Hypertext Markup Language), coding language that is the foundation for all web development. If HTML is the first language to learn when starting to build websites, then CSS goes after it.

What is CSS?

CSS stands for Cascading Style Sheets with an emphasis placed on “”Style”. While HTML is used to structure web document, CSS specifies your document’s style – page layouts, colors, and fonts are all determined with CSS.

How Does CSS Work?

CSS brings style to your website by interacting with HTML elements. As you know elements are the individual HTML components of a web page like paragraph.

<p>This is my paragraph</p>

For example you can make this paragraph appear red to people viewing your website through a web browser. Then you need to use CSS code which looks like this

p  {  color:red; }

Here “p” is called the “selector”—it’s the part of CSS code specifying which HTML element the CSS styling will effect. In CSS, the selector is written to the left of the first curly bracket. The information between curly brackets is called a declaration, and it contains properties and values that are applied to the selector. The full bracketed set of

{  color:red; }

is the declaration. These same basic principles can be applied to change font sizes, background colors, margin indentations, and more.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: