CSS For Beginners
Now that you may be wondering what CSS is, after my Tables And CSS article, I have made this tutorial!
CSS may seem complicated, and very fustrating at first, especially when something works in Firefox, and not in Internet Explorer, or the other way around. CSS, in the end, makes everything easier, and gives you control over your pages. This will only be a brief introduction to CSS, but remember, the sky is the limit with CSS! Now open Notepad, and lets get started!
Lets say we want to make a whole paragraph bold, we would use the code below.
<p>My Paragraph My Paragraph My Paragraph My Paragraph My Paragraph</p>
</strong>
How would we do this using CSS? It's simple! We will start off by adding the style tags to the head of our page like below.
<head>
<style type="text/css">
</style>
</head>
<body>
<p>My Paragraph My Paragraph My Paragraph My Paragraph My Paragraph</p>
</body>
</html>
Now that we have our style tags in our page, we can start setting our styles for the page inside our style tags. Below you will see the CSS syntax.
So with that syntax in mind, lets make that paragraph bold! Below we add the style to our paragraph.
<head>
<style type="text/css">
p {font-weight: bold;}
</style>
</head>
<body>
<p>My Paragraph My Paragraph My Paragraph My Paragraph My Paragraph</p>
</body>
</html>
Now to explain the above code. As you can see we are using the three part CSS syntax.
P is our selector, our property is font-weight, and our value is bold
Now if you open up your HTML file, your paragraph should appear in bold text. As I stated above, there is a lot more to CSS. I will be making more of these tutorials so keep checking back!