Intro to CSS

CSS is going to be a life saver if you’re working with an HTML website, as long as you know the basics of HTML. What is CSS? CSS Stands for Cascading Style Sheets CSS defines how to display HTML elements External Style Sheets can save a lot of work for …

CSS Text

Text Color With CSS, a color is most often specified by: a HEX value – like “#ff0000” an RGB value – like “rgb(255,0,0)” a color name – like “red” The default color for your website is defined in the body selector: body {  color: blue; } h1 {  color: #00ff00; } h2 {  color: rgb(255,0,0); } …

CSS Syntax

CSS Syntax A CSS rule set consists of a selector and a declaration block: h1 {color:red; font-size:12px;} “h1” is the selector, it points to the HTML element you want to style. Everything within the curly brackets is the declaration. “color” and “font-size” are the properties. “red” and “12px” are the …

CSS Selectors

CSS Selectors CSS selectors allow you to select and manipulate HTML elements. Selectors are used to fine/select certain HTML elements based on their ID, attributes, classes, values, etc. Element Selector The element selector selects elements based on the element name. For example, by selecting the <p> element, then all the <p> …

CSS Background

Background Color The background-color property specifies the background color of an element. The background color of a page is defined in the body selector: body { background-color: #FFFFFF; } With CSS, a color is most often specified by: a HEX value – like “#ff0000” an RGB value – like “rgb(255,0,0)” …