Website Babble Webmaster Forums  
  #1 (permalink)  
Old 06-23-2008, 05:03 PM
Regular Babbler
 
Join Date: May 2008
Posts: 52
Default in-line,internal & external

hi room
i came across these words in the CSS beginner's guide at htmdog.com,can somebody explain what they mean?thnx
Reply With Quote
  #2 (permalink)  
Old 06-23-2008, 05:38 PM
lisa's Avatar
Administrator
 
Join Date: Apr 2007
Location: Dallas, TX
Posts: 3,500
Default

An internal style sheet is where you put the code for the style of your page inside the <head> of your page. There is no separate style sheet. This is good if you have a specific style you want to use for one page, not sitewide.

Say you want to define the font for a small amount of text but you don't want to apply this style for the entire site. You would use an internal stylesheet by placing some code directly on the page...

Code:
<style type="text/css">
   .adHeadline {font: bold 8pt Arial; text-decoration: underline; color: #CC0000;}
   .adText {font: normal 8pt Arial; text-decoration: none; color: #000000;}
</style>
In this example, I am defining two styles: adHeadline and adText that have Arial font, size 8 and their respective text decorations

An external style sheet is where you define the CSS attributes on a totally different file and you link to that file on the page that calls up the attributes. This is what I use for all my sites. So in my <head> I have a line that reads something like...

Code:
<link href="http://www.mydomain.com/style.css" rel="stylesheet" type="text/css">
Where style.css is the external style sheet. This tells the page where to look for the style sheet. So if I want to change my entire site's font, I would open up style.css and make the appropriate changes.
__________________
Don't put the cart before the horse.
Plan your website, then create it.
~~~~~~~~~~~~~~~~~~~~~~~~~

Recent Blog Posts...

Most Bloggers are Poor Marketers
Make Money as a YouTube Partner
Don't Discount Amazon's Affiliate Program
Reply With Quote
  #3 (permalink)  
Old 06-23-2008, 05:39 PM
Govindji_Patel's Avatar
Master Babbler
 
Join Date: Mar 2008
Location: Jonesboro
Posts: 205
Send a message via MSN to Govindji_Patel Send a message via Yahoo to Govindji_Patel Send a message via Skype™ to Govindji_Patel
Default

they have explained it all on this page

http://www.htmldog.com/guides/cssbeginner/applyingcss/

inline is in your html code

internal is in your <style> tags on each page

external is normally external file that you call in your <head> tag
Reply With Quote
  #4 (permalink)  
Old 06-23-2008, 06:49 PM
TechieGuy's Avatar
Supreme Babbler
 
Join Date: Jul 2007
Location: Canada
Posts: 890
Default

When using stylesheets, go with external. The most significant improvement between internal and external CSS is download speed.

When a visitor requests your web page, the browser will look at the linked CSS file and download it. If you use the same CSS file on all your pages, then the browser will only download the CSS file once and used the cached version for subsequent pages.

For internal CSS, the CSS code will be downloaded everytime a page is requested by the browser, since it is part of the page and not separate.
__________________
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 05:29 PM.



WB Sponsors

Profit Lance Review

affiliate network

Work At Home Jobs

Expert PPC Coaching



 Subscribe to the Website Babble Feeds

2 Create a Website Homepage | 2 Create a Website Blog


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0