Basics of CSS

Cascading Style Sheets are the files used to enhance a website and really can make a website pop. CSS, short for Cascading Style Sheet, handles all the display formats like font, color, spacing, size, border, and many other display characteristics. I have an example on how you could change the color of the font and the background color of the heading on this page.

When writing CSS code, you first want to start by selecting a tag you want to change. In the example, I chose to change the h1 tag. Inside the curly braces is where you select what you would like to change about the display like the font or a color. In the example, I am changing the color of the font and the background color of the tag. To select a color, you can either use a built-in color name, HEX values, HSL values, RGB values, RGBA values, or HSLA values.

With CSS you can create one style sheet to use on multiple different pages throughout your website. It is good to keep the display consistent throughout the web page. There are also display settings that allow you to change the fluidness of objects on the page which allows smaller screens to view the page. This makes your webpage easy to view on phones and other electronics with a smaller screen. Also, this can help with computers when the user wants to put your page split screen with something else. One super important thing to remember when using CSS is a semicolon is required after every property name and value pair. If you forget one, this can cause problems with your code because this will stop the code at the error.