Tutorials & Script Homepage
Style Sheets 1 to 6
Style Sheets: Intro. Part 1
Style Sheets: Intro. Part 2
Primer Part 1
Primer Part 2
Primer Part 3
Primer Part 4
advertisment
advertisement
advertisement
Host With Us: HostingHelper.co.uk From Only $5.00p/m
Spotted an Error ? Let us Know
100's more FREE templates at FreeWebTemplates
Looking for a new Web Host ?
Free templates from TemplatesLand
Professional High-End Templates
TemplateBox.com more FREE templates
Free Flash Templates and Intros
advertisement
 
STYLE SHEETS NUMBER : 01
Please Click Here, and Help Keep This Site FREE to Use
 
Please click on our sponsors advert to the right if you download or use anything from this page.
Thank you for your help.

Style Sheets: Introduction (Part 1)

You've probably heard a lot about Cascading Style Sheets (CSS) lately and even if you haven't, there's a good chance you've been using numerous Web sites that make use of this new technology. Here you'll find a step-by-step guide to CSS, and how you can use it to your advantage.

CSS offers Web designers many of the features commonly found in desktop publishing applications. With CSS you can specify font point sizes, font attributes (italics, underline, etc), page margins, colors, spacing, positioning, visibility, and much more.

Note: To see all of the examples in this article you need to use a browser version that supports CSS, such as Navigator 4.x or Internet Explorer 4.x.

Using CSS you can apply different attributes to every tag you use in your pages. These attributes are expressed in "rules"; a rule is made up of a selector (the tag to which it applies) and a declaration (the attributes to be applied). For example, if we wanted to set your <P> tags to display 12-point Ms Sans Serif with a yellow background, we would create the following rule:

	P { font-family: "ms sans serif"
	font-size: 12pt; background-color: yellow; }

In the above rule, P is the selector -- the HTML tag to which the style attributes will be applied. Curly braces mark the start and end of the style declaration that apply to the selector. It's important to remember to separate each declaration with a semicolon.

Let's start with a basic HTML file.

	<html>
	  <head>
	    <title>Welcome to my Web Page</title>
	  </head>
	  
	  <body>				
	    <h1>Welcome to my Web Page</h1>
	    <p>Today I'm going to learn CSS</p>
	  </body>
	</html>

Now let's add some style! We'll change the attributes of the <H1> tag for our header and <P> for our page content by inserting the following code into the <HEAD> of our HTML document.

	<STYLE TYPE="text/css&">
	<!--
	P { font-family: "ms sans serif";
	    font-size: 12pt;
	    background-color: yellow; }
	H1 { font-family: "impact, arial";
	    font-size: 35pt;
	    color: blue; }
	-->
	</STYLE>

Being able to attach attributes to specific tags can be useful, but if you're like most people you probably don't think of your pages in terms of where the <H1> and <P> tags are. You probably break the page down into content areas such as "header," "content," "nav bar," etc. CSS makes it easy to assign a style to a specific area by using classes.

Style Sheets: Introduction Part 1 | Style Sheets: Introduction Part 2

Web Hosting  |  Membership website templates  |  Reliable UK Web Hosting  |  dresses  |  Art Web Templates  |  Cheap Flight Deals  |  UK Web Hosting Company  |  Coursework Writing  |  Reseller Hosting  |  coches de ocasion  |  Cheap UK Web Hosting  |   cell phones  |  Web Design  |  Low Cost Domain Names  |  Website templates  |  master a distancia  |  Austin Web Design  |  Flash Templates  |  Factory  |   cell phones  |  Canadian Web Hosting  |  Flash Intros  |  Web Templates  |  cartuchos  |  Corporate Logo Design Service  |  Website Templates  |  Bespoke Software Development  |  Domain Name Registration  |  Free Website Templates  |   Dedicated Server  |  UK Web Hosting  |  Dating Software - aeDating 4.1  |  Website Templates  |  Power Saver  |  taobao agent  |  Flash templates  |  Lolita Dresse  |  china wholesale  |  Canadian Web Hosting  |   Cheap Web Hosting Deal  |  Linux Hosting  |  Web Design uk  |  Web Hosting  |  Business web directory  |  Electronics  |  Free domain names  |  Best UK web Hosting  |  Shower Enclosures UK  |  

 
advertisment
advertisment
advertisment
  Top-end templates
  Flash Templates
  Web Hosting UK
  Made-in-China.com
  Web Design Tips
  Web Hosting Reviews
  Web hosting reviews
  Website Design
  Cheapest web hosting
  Stock Photography
  Bildagentur
  Reseller Hosting
  Company Logos
  Website Templates
  Website Templates
  Web Hosting UK
  templatebox.com
  freewebtemplates.com
  templatesland.com
  topfreegraphics.com
  freegraphicland.com
  free-templates-layouts
  Logo Design Software
  Layouts4Free
  Webmaster Resoucres
  Web Templates Factory
  Free Web Templates
  Free Templates Catalog
  Web Templates
  Reseller Web Hosting
  Stock Photography
  Animations-galore.com
  4print.com.au
  Host Review
  Web Hosting Host Color
  Dedicated Servers
  FlashTemplateDesign
  ZeroDollarTemplates
  Killersites.com
  how-to-build-websites
  Build a free website
  web Hosting
  Business Logo Design
  Templates Favpage
  webmastermind.de
  flasheasy.com
  More Featured Sites