Cascading Style Sheets (CSS)
I don't expect you to actually write your own CSS, but I want you to understand what's happening behind the scenes. If you use a web site template (a template that sets a certain style to your web site) it is using CSS to do that. You can change templates without impacting the main content of your site. It's like changing from looking like a cowboy to looking like a clown. You're still you underneath, but the covering has changed. That's essentially what a template or CSS does. If you're interested in using or learning more about CSS, then I recommend that you find a template that you like online. You can download the template and play around with it.
CSS Basics
What are CSS? Cascading Style Sheets (CSS) are an extension to HTML which allows you to present a certain style (color, font, size, etc.) to all of your web pages.
How do CSS work? Once you establish a set of style rules for your web site using CSS, all of the content on your web site will have a similar look and feel which is defined by those rules.
The basic format within CSS looks like this: selector {property: value;} The selector is the HTML tag that you want to be controlled by this rule.
The property and value define the look and feel of the selector (HTML tag).
Here's what I mean. (Example)
If in your website you have the following line: <h1>My first heading</h1>
Then if you have a CSS which has this line: h1 {color:blue; font-weight:bold;}
So everywhere that you have used a header (h1) in your HTML you will see it in blue and bold.
Note: To make a custom CSS work with your HTML web pages, you will need to add a line in the header section of your HTML to point to the CSS that should be used. So if you named your CSS myStyle.css then this is how it would look in your HTML. <html>
<head>
<link rel=”stylesheet” type=”text/css” href=”myStyle.css” /> …
</head>
…
</html>
|