Understanding the Basics of CSS
53What exactly is CSS? CSS stands for Cascading Style Sheets and they are a separate language but a step above just the basics in HTML. The best way to look at this would be an item that saves you from extra coding and can free up some speed in order to have your sites run at a better rate. Plus, you could apply it to all the pages you wish for it to be used. There are three types and look below with a description and an example of how they work.
Internal: Internal means from within and with it, you have the style sheets that don't require a separate page to be posted. The key with this is to post them in the <head> tag because it will not work posting below it in the <body> tag. You can use it for any of the tags as you see plus some other ones like the <p> tag for example. Let me show you a brief sample on how it looks. Just observe below.
<head>
body {background-color: #000000; font-color: #ffffff; font-family: Verdana}
p.question {font-color: #00008B}
</head>
As you see above, that is just a mere example. If you know HTML, this shouldn't be a problem. I also would like to point out that if you do however decide you want one specific tag affected without going after the others, you will need to do something like this: <p class=""></p> and put something in there for the attribute. This however is needed for internal and external style sheets.
External: For this, it would be used in terms of having it on a completely different page but in order for it to be effective, it must however have a link to it. If you don't have it however, it won't work and whatever you make for your style sheet will not apply at all. Much like internal, external must be placed right at the header portion.
<link rel="stylesheet" href=".css" type="text/css" />
This code above is the one you must use in order to get it done right.
Inline: This one is however different from the previous ones mentioned above. The best way to put is CSS used within HTML coding. However, you do not need to link it to a specific style sheet as you apply it directly to the tools to the area. Sometimes it can be used for positioning purposes. It can be known for usage with table less web pages in order to display the pages properly.
<p style="font-family: Arial; font-size: 13pt"></p>
These items above should give you a basic understanding of CSS. It can be really easy or really hard depending upon how much you are willing to learn in that regard. It is a very handy tool and can really be a life savor on coding. It should be something to point that as much as of a great tool this could be, there is a drawback to its usefulness. Depending upon alignment and using horizontal and possibly vertical alignment, one browser may view the page properly while the other may display it the wrong way. From my own usage, it could happen with just going with table less but it doesn't always.
CSS can be very handy if you learn to use it. The best way to learn it is to do it hands on. If you know HTML, this shouldn't be too difficult to understand.
|
The Essential Guide to CSS and HTML Web Design (Essentials)
Price: $20.00
List Price: $34.99 |
|
Pro Blog Design
Price: $1.99
List Price: $1.99 |
|
Health & Medical 2 Web Design Elements - Templates, Logos and Photos
Price: $59.95
List Price: $79.95 |
|
Web Design Training in JavaScript, HTML, CSS. Video Based Training on 3 DVDs
Price: $49.57
List Price: $349.85 |
PrintShare it! — Rate it: up down flag this hub








newcapo says:
12 months ago
Very helpful hub, thanks. Great introduction.