I'm just really getting into designing websites, and so far the only language I know is basic HTML, and I've been thinking I should probably learn other languages if I want to build really nice sites. But I've been wondering, what exactly is CSS? I here about it a lot, but I realized I don't actually know what it is. How is it different than HTML? What is it used for? Does anyone have an example of what it looks like, Both the code and the finished product? Thanks for answering the noob questions.
Frankly and sorry to say that it is really a noob question, any search would have given you the answer, don't need a forum post for a definition. You can learn from good sites for eg http://www.w3schools.com/Css/default.asp
In a nutshell, html is a structural markup language that uses tags to state what each part of a document is. CSS is a presentation language that defines how the html document parts are to be displayed. Let me give you a simplistic example. Say you want your main header on each page to be red. In html you would use the font tag, eg. <h1><font color=red>Blah!</font></h1>. There are two major issues with this. First, the font tag is no longer a part of html (since 1999), and browsers are not required to support it (though they do). Second, if you decide to change the color, you will have to find every instance of h1 and edit the font tag. Using css, the html would be <h1>Blah!</h1> and the css file would have h1 {color: red;}. To change the color of all h1s, you simply change the one entry in the style sheet. W3schools is good, if a bit dated in its approach. Follow the HTMLDog tutorials in the order presented for a better learning experience. wisdomtool is correct, good netiquette would suggest you stfw before posting to a forum. cheers, gary
I would strongly advise learning CSS in paralell to HTML. If you get used to HTML alone, you'll be having a harder time releasing those old HTML habits and replacing them with the new standards later on.
CSS Allows you to Seperate Presentation From Structure It Allows you to control a million page styles from one document, which you save as a .css file You can like html, put the css in a notepad document, then link from the html document to the CSS document. You put the Link in the head of the document CSS allows you to significantly Reduce code, it makes it easier tremendously to organise what your doing Visually CSS can make beautiful webpages, very simply, have a Look at the webpage CSS Zen Garden The Simplicity of CSS allows easier Indexing in Search Engines I highly recommend the book "CSS The missing Manual" Good Luck
CSS makes coding for HTML more fun and easier. It save alot of time from having to write the same code over and over again.
HAHA SKENK an example of css would be this. <style> h1 { color:red; font-size:1.2em; } p.small { font-size:.8em; } </style> <h1>Header 1 test</h1> <p class="small">Small text test</p> Code (markup): output: Header 1 test Small text test