what is CSS i.e. cascading style sheets? how to work with them?
Public Comments
- Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents. For more info and tutorial visit http://www.w3schools.com/css/
- CSS is a language you can use instead of using html itself for describing the format in which a web page is displayed. html (or xhtml) becomes the "bones" and CSS becomes the "skin". For example, instead of <p >< b>This is bold print</b >< /p> you'd write it with<p style="font-weight: bold;">This is bold print.</p > (I've added extra spaces in the html for Yahoo!) ...Better yet, you'd put it as, <p class="meeting" >This is bold print< /p> ...then, somewhere in a CSS file you'd have p.meeting { font-weight: bold; } ...and later, if you decide you want meetings displayed in small print instead of bold print, you could just change all meetings in all html files by changing that one CSS file to say, p.meeting { font-size: smaller; } ...saves time, que no?
- Cascading style sheets is just that, a styling sheet. HTML and CSS work together to style your website: font, color, background, position of divs, widths and heights, etc. There are two ways to make your CSS work with your HTML: One is to write your CSS in between the head tags of your HTML file like this: <html> <head> <title>How CSS works</title> <style type="text/css"> body {background-image: url(Address of picture to be used) } p {color: green; font-size: small; font-family: arial; } </style> </head> <body> <p>This text will appear small, green, and in arial.</p> </body> </html> Another way is to link your HTML file to a separate CSS file. <html> <head> <title>How CSS works</title> <link type="text/css" rel="stylesheet" href="URL to CSS file" /> </head> <body> body content </body> </html> This website should help you understand CSS a little better and maybe even teach you how to use it. http://www.utexas.edu/learn/css/
- If you wanna learn how to use CSS you can subscribe to my blog. http://www.flixya.com/blog/charnitaz I'm soon gonna be posting CSS tutorials! :)
Powered by Yahoo! Answers