CSS - What is it?
CSS, or Cascading Style Sheets, is used to define the content in your HTML page. This represents how the content will be displayed on your website. CSS is able to save you a lot of work since it can control the layout of multiple pages at once.
CSS Syntax
A CSS rule has two parts, a selector and a declaration block. The selector is used to pick the HTML element that you want to style (example: h1). The declaration block contains the style traits you want to add to your HTML element. This includes the curly brackets {} and the info inside it (example: { color:pink; font-size:2em; } ).
CSS Selectors
There are different selectors to choose from in CSS. The most simple selectors are the element, id, and class selectors. The element selector chooses an element based on the element name (example: p { color: purple; } ). The id selector chooses an element with a specific id, this is done by using a # and then adding the id (example: #step1 { color:purple; } ). The class selector chooses an element with a specific class attribute, this done by using a . and then adding the class name (example: .center { color:purple; } ).