Hey everybody I want to let you know that I have undertaken the grueling task of getting the heck away from WordPress. I was so sick of the problems and updates I had to do all the time. I am now using my ezbloo system and I am integrating all my old posts into the new system. It sucks, but in the end, I will save bundles of time. I needed to keep things simple and that is why I created ezbloo. I'll have more on this later for you guys after I am done with the total integration of my old posts here. So if you are looking for a post and need it faster, shoot me an email and I will make it a priority. [email protected]

What is CSS? CSS is an acronym for "Cascading Style Sheets". We use CSS to style webpages. With it we can specify positions, colors, background and much more.


CSS Syntax

The CSS Syntax follows a basic structure. First your target the element that you want to change. Next you will give it some commands. Here is the basic structure of the syntax.
body{color:red;}

Target Classes

If you need to target a class you will use a period(.) to accomplish this. Here is an example of using a class.
<div class="foo"></div>

.foo{background-color:blue;}

Target ID's

We target id's with a # sign. If you want to target a div your CSS code would look similar to this.
<div id="foo"></div>

#foo{color:pink;}

Target HTML Elements in CSS

You can target any element that is on your webpage. For example if we wanted to target the entire body of our webpage our code would look like this in CSS.
body{background-color:#ccc;}

Other Common Elements To Target in CSS

There are a host of elements to target. Here is a short list.
  • html
  • body
  • h1
  • h2
  • h3
  • h4
  • h5
  • h6
  • p
  • span
  • div
 

Practice

Now that you have knowledge of html and CSS you can try to do a web page. Here is a mock-up for you to try and program yourself. mockup  

Code for Today's Lesson

index.html

<html>
<head>
<title>What is CSS Absolute Beginner Web Development</title>
<link rel="stylesheet" href="style.css"/>
</head>
<body>

<h1 class="foo">What is CSS Absolute Beginner Web Development</h1>

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularized in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

</body>
</html>
 

style.css

.foo{
color:yellow;
}
  Next Lesson