3 replies [Last post]
skier4467
Offline
newbie
Last seen: 16 years 10 weeks ago
Joined: 2004-08-13
Posts: 2
Points: 0

I just started using CSS. We have the option to put the code in the page's html or link to a css document separately (which hold all the info for the css). Which is better? Faster? etc.....
thanks!

justers
Offline
newbie
England
Last seen: 16 years 13 weeks ago
England
Joined: 2004-07-22
Posts: 8
Points: 0

Should I put CSS scripts in the HTMLor link to them?

Link to the stylesheet, as its best to have as little code in your pages as possible. It makes search engine spiders lives alot easier when crawling though your site.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 31 weeks 18 hours ago
Joined: 2004-06-30
Posts: 9668
Points: 801

Should I put CSS scripts in the HTMLor link to them?

Also, you only have to edit one file to change the css for every page.

Verschwindende wrote:
  • CSS doesn't make pies

obsidian
Offline
Enthusiast
South Carolina
Last seen: 14 years 1 week ago
South Carolina
Joined: 2004-08-15
Posts: 136
Points: 0

Should I put CSS scripts in the HTMLor link to them?

I wholeheartedly agree with the external style sheets whenever possible, however, to avoid clutter and confusion when looking through your CSS page later (especially when you've got several hundred lines of code on it), I like to put any styles that are only relevant to the current page ON that current page, that way, if you want to change it, there's no wading through the hundreds of lines of code. Another option is to use the inline style attribute for those rare occurences!

Hope this helps!!!

You can't win, you can't lose, you can't break even. You can't even get out of the game!