Learning CSS

Today I reviewed some of the CSS fundamentals and colors.

CSS stands for Cascading Style Sheets. It is used with HTML to build web pages. More information is found at:


Some Basics:

HTML and CSS are usually kept in separate files in order to keep code maintainable and readable, as well as keep structure separate from styling.

The <style>element allows you to write CSS code within an HTML file.

A CSS stylesheet can be linked to an HTML file using the <link>element, which requires three attributes:

  • href- set equal to the path of the CSS file.
  • type- set equal to text/css.
  • rel- set equal to stylesheet.

More Basics:

  • A CSS selector targets an HTML element.
  • CSS declarations style HTML elements.
  • Declarations must contain the following two things:
  • property – the property  to style.
  • value – the value for the property
  • CSS declarations must end in a semicolon (;)
  • A CSS rule consists of a CSS selector and the declarations inside of the selector.
  • Comments: /* comment */

Tomorrow I will blog about colors and fonts.u


Please follow and like us: