SPN Logo   Click Here for the Web's Best Resource Sites
  Advertise in SiteProNews SiteProNews Archives About SiteProNews SPN Privacy Statement FeedBack SiteProNews Homepage SiteProNews Image Map SiteProNews IT Career Center
  Put Your Marketing Efforts on Auto Pilot
    QUICK LINKS
 
JANUARY 21,  ISSUE # 127
Search the Web

Add your Site to ExactSeek
Subscribe
Subscribe to one, or more, of four great newsletters: SiteProNews, our daily Webmaster ezine; NetViewpoint, the weekly ezine that focuses on current and future Net trends; EzineReport, the weekly ezine that evaluates and reviews other ezines; and NoviceNews, a daily newsletter with useful tips and tricks for Net novices and all computer users.

Just enter your email address in the box below and click the subscribe button.

Text HTML Newsletter
SiteProNews
NetViewPoint
EzineReport
NoviceNews

Tip of the Day
Internet users are becoming more and more concerned with their privacy. To build your potential customers' trust in you, tell them about their privacy. Create a page on your web site called "Privacy Statement" and let your visitors know exactly what you do with the personal information you collect.

Today's tip is by Shelley Lowery, webmaster of Web-Source.net
 

MyZip.com Downloads
SPN App of the Day
Domain Name Analyzer v3.0 (489 KB) is a free program for finding the best domain name for your product or business. Create the names you want to check from keywords, names you select, imported names from a text file or convert all the words in an article or story to domain names. You can even perform Trademark Lookup. For Win 95/98/NT/ 2K/XP. Freeware.

If you have a Webmaster App that you would like listed on the SPN site, send us an email with details to: wapps@sitepronews.com
SPN Site of the Day
HTML Source has HTML tutorials on virtually all aspects of HTML authoring, each packed with in-depth expert advice, diagrams and tips. There is also a nice HTML reference section with a full tag reference and information on Web safe colors, special characters, and much more.

Think your web site qualifies as a SPN Site of the Day, send us an email with details to: sotd@sitepronews.com

Must Read Ebooks
In the coming months, we plan to provide our visitors with one of the most comprehensive EBook link libraries on the Web. Check back frequently for new additions. In the meantime, check out our current selection of Commercial and 80 plus Free EBooks.

We welcome authors of EBooks to submit their publications to SPN via email to: ebooks@sitepronews.com
 

Need some good promotion tools to give your web site an edge on the competition? Well, this is a good place to start your search. We'll be adding freeware and shareware promotion software on a regular basis Check out our current selections right now.
 
Submission Tools
Site submission can be a time intensive undertaking. Fortunately, there are growing number of submission applications that can save you time and money. Some are sophisticated and some are pretty basic. You can check out our current picks right here.
 
Link to SiteProNews
Link your site to SiteProNews, the free, daily newsletter for WebMasters and the fastest growing resource site for novice and expert HTML authors on the Web.

Or, Add SPN to your site with just 2 lines of JavaScript code. Top content for your site without any of the work.

Check out the SPN Promotion Partners page. Some great sites have opted to support the SPN newsletter

Recommended Services
Bravenet - Top Rated Web Tools for Webmasters.

Web-Source.net - Your Guide to Professional Web Site Design & Development

PreWired.com - Providing ISPs & Publishers an Instant Web based revenue stream!

Automarketic.com - Skyrocket Sales & Explode Profits With The #1 Online Marketing Machine..

SubmitPlus - Promote your site to 110 search engines... FREE!

Pocket Flier! - Generate 25,000 targeted visitors to your site!

NetMechanic - Web Tools For Site Maintenance, Promotion, Browser Compatibility & More.

Affinity - Robust, reliable Web Hosting for small & medium-sized web sites.

TrafficZap - Free Traffic Tools.

StartBlaze
Prime Web Traffic
For 2 cents/Hit!
 

ExactSeek
EzineHub
NoviceNews
GoArticles
SPN Awards
ROIbot Pro
RankPilot
Submit Plus
PocketFlier
NetMechanic
Magic Words
Testimonials
Web Resources

An Introduction To
Cascading Style Sheets

by Steve Nash
CSS (Cascading Style Sheets) have been around for a while now, and act as a complement to plain old HTML files. Style sheets allow a developer to separate HTML code from formatting rules and styles. It seems like many HTML beginners’ under-estimate the power and flexibility of the style sheet. In this article, I’m going to describe what cascading style sheets are, their benefits, and two ways to implement them.

1 2 3 SUBMIT PRO... Top 21 FREE Submission

Offers free website URL submission to TOP 21 search engines, 12600+ professional Website Promotion and HTML code Optimization. Submit your URL to over 12600 search engines, directories and FFA! We offer an affiliate program that lets you earn high commissions. Free Website promotion Tools!

Click Here For Details

Cascading whats?

Cascading Style Sheets...that’s what! They’re what paint is to canvas, what topping is to ice cream... they complement HTML and allow us to define the style (look and feel) for our entire site in just one file!

Cascading style sheets were introduced to the web development world way back in 1996. They get their name from the fact that each different style declaration can be “cascaded” under the one above it, forming a parent-child relationship between the styles.

They were quickly standardized, and both Internet Explorer and Netscape built their latest browser releases to match the CSS standard (or, to match it as closely as they could).

So, you’re still asking what a style sheet exactly is? A style sheet is a free-flowing document that can either be referenced by, or included into a HTML document. Style sheets use blocks of formatted code to define styles for existing HTML elements, or new styles, called classes.

Style sheets can be used to change the height of some text, to change the background color of a page, to set the default border color of a table...the list goes on and on. Put simply though, style sheets are used to set the formatting, color scheme and style of an HTML page.

Style sheets should be used instead of the standard <font>, <b>, <i> and <u> tags because:

- One style sheet can be referenced from many pages, meaning that each file is kept to a minimum size and only requires one extra line to load the external style sheet file.

- If you ever need to change any part of your site's look/feel, it can be done quickly and only needs to be done in one place: the style sheet.

- With cascading style sheets, there are many, many page attributes that simply cannot be set without them: individual tags can have different background colors, borders, indents, shadows, etc.


MAGIC WORDS THAT BRING YOU RICHES

You are 17 words or less away from a fortune! Do you know all 17 words? Click below to discover the 17 magic words that can change your life.

Click Here For Details


Style sheets can either be inline (included as part of a HTML document), or, referenced externally (contained in a separate file and referenced from the HTML document). Inline style sheets are contained wholly within a HTML document and will only change the look and layout of that HTML file.

Open your favorite text editor and enter the following code. Save the file as stylesheet.html and open it in your browser:

<html>
<head>
<title> Cascading Style Sheet Example </title>
<style>
h1
{
color: #636594;
font-family: Verdana;
size: 18pt;
}
</style>
</head>
<body>
<h1>This is one big H1 tag!</h1>
</body>
</html>

When you fire up your browser, you should see the text \"This is one big H1 tag!\" in a large, blue Verdana font face.

Let’s step through the style code step by step. Firstly, we have a pretty standard HTML header. The page starts with the <html> tag followed by the <head> tag. Next, we use a standard <title> tag to set the title of the page we are working with.

Notice, though, that before the <head> tag is closed, we have our <style> tag, its contents, and then the closing </style> tag.

<style>
h1
{
color: #636594;
font-family: Verdana;
size: 18pt;
}
</style>

When you add the style sheet code inline (as part of the HTML document), it must be bound by <style> and </style> tags respectively. Our example is working with the <h1> tag. We are changing three attributes of the <h1>’s style: the text color (color), the font that any <h1> tags on the page will be displayed in (font-family), and lastly, the size of the font (size).

The code between the { and }are known as the attributes. Our sample code has three. Try changing the hexadecimal value of the color attribute to #A00808 and then save and refresh the page. You should see the same text, just coloured red instead of blue.

An example of an external style sheet

External style sheets are similar to internal style sheets, however, they are stripped of the <style> and </style> tags, and need to be referenced from another HTML file to be used.

Create a new file called “mystyle.css” and enter the following code into it:

h1
{
color: #a00808;
font-family: Verdana;
size: 18pt
}

Next, create a HTML file and name it external.html. Enter the following code into external.html:

<html>
<head>
<title> External Style Sheet Reference Example </title>
<link rel=\"stylesheet\" type=\"text/css\" href=\"mystyle.css\">
</head>
<body>
<h1>This is one big H1 tag!</h1>
</body>
</html>

As mentioned above, you can see that the actual code in mystyle.css is exactly the same as it was in the inline example. In our HTML file, we simply place a <link> tag in the <head> section of our page. The rel=”stylesheet” attribute tells the browser that the link to the external file is a style sheet. The type=”text/css” attribute tells the browser that mystyle.css is a text file containing css (cascading style sheet) declarations. Lastly, the href=”mystyle.css” attribute tells the browser that the actual file we want to load is mystyle.css.

Conclusion

Well, there you have it, a quick look at style sheets and how to implement both an inline and external version. Checkout the links below if you’ve never worked with cascading style sheets before. You will be surprised at some of the things you can do with them!

DevArticles.com
WebMonkey
WebReview.com
W3C CSS Validator

  About The Author
Mitchell Harper is the founder and senior editor of DevArticles. DevArticles provides its readers with top quality ASP, PHP and .NET articles, interviews and product reviews. If you're looking for insider tips and tricks, you'll also find them at DevArticles.


Recommended Webmaster Apps & EBooks

Psychological Triggers
Advanced psychological tactics that will boggle your mind. Learn 30 ways to make prospects buy from you - and how you can use these tactics ethically to double or triple your sales.

The Insider's Guide To Dominating the Search Engines
Introduces you to revolutionary, "tried-and-tested" optimization strategies which will increase your website traffic by 10, 100, or even 1000 times ... GUARANTEED. See results start to materialize in as little as 2 days....and see significant results appear in just 1 month.

EzineAnnouncer - The Ultimate Ezine Promotion Tool
Explode Your Ezine With This Revolutionary New Piece of Software -- Results Are 100% Guaranteed! Now it's easier than ever to launch and promote your ezine. Auto-pilot ezine promotion software shows you where you need to be and does 80% of the work for you!

Multiple Autoresponders At An Unbelievable Price
An automatic marketing system from Automarketic with up to 50 autoresponders that you can use for product announcements, discount offers, affiliate programes, marketing reports, training courses and more. Personalize your messages in text or HTML. Unlimited Automatic Follow Ups At User-Defined Intervals! You can even use Automarketic autoresponders as a newsletter server.

 

Tell your friends about SiteProNews!
Your E-mail
Friends E-mail
Your Message

 

  SiteProNews now reaches over 6 million Subscribers

Previous SPN Sites of the Day       Previous SPN Tips of the Day       Previous SPN WebMaster Apps of the Day      


©Copyright 2001 Jayde Online, Inc. All rights reserved. Web design by ControlV.