Return to iWEBTOOL

Go Back   iWEBTOOL Talk > The Web and your Website > Programming > HTML
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 
Welcome to iWEBTOOL Talk, where you talk about webmaster-related stuff.
 
Discuss topics which interest you.
With over thousands of threads (topics), we're sure you'll find something that'll interest you.
Ask for help whenever you need it.
We have thousands of members who are available to help you if you need it.
It's absolutely FREE!

 1  Register           2  Browse the board           3  Discuss whatever may interest you!
 


Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 10-03-2007, 03:21 PM   #1
Chart Music
iWEBTOOL SEO Advisor
 Contributor 
 
Chart Music's Avatar
 
Join Date: May 2006
Posts: 1,252
Chart Music has a spectacular aura aboutChart Music has a spectacular aura aboutChart Music has a spectacular aura about
Default Style isn't allowed...

Check HTML warning and pondering on this.
I'm using styles, yet where ever I put the code it warns me it isn't allow in that area.
Where is style suppose to go?


<style> isn't allowed in <html> elements
<style> isn't allowed in <body> elements
Quote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"

"http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>Title</title>
</head>
<body>
... body of document ...
</body></html>
__________________
Eco Tours | Gift Baskets

See a good post?
<--Give thanks by clicking left of post.
Chart Music is offline  
 
This is an Ad Revenue Sharing forum Place your advert here
SEO Checklist
Get yourself better ranking with
our "Do-it-Yourself" SEO Checklist.
Click Here
Old 10-03-2007, 03:47 PM   #2
Bagi Zoltán
iWEBTOOL Moderator
 Contributor 
 
Bagi Zoltán's Avatar
 
Join Date: Aug 2006
Location: Hungary
Posts: 1,762
Bagi Zoltán is a glorious beacon of lightBagi Zoltán is a glorious beacon of lightBagi Zoltán is a glorious beacon of lightBagi Zoltán is a glorious beacon of lightBagi Zoltán is a glorious beacon of light
Default Re: Style isn't allowed...

Chart, why don't you use external css file?
Place this code
Quote:
<link href="/css/style.css" rel="stylesheet" type="text/css">
to the head and no warming.
Bagi Zoltán is offline  
Old 10-03-2007, 04:04 PM   #3
jumpenjuhosaphat
 Contributor 
 
jumpenjuhosaphat's Avatar
 
Join Date: Jun 2006
Location: Denver
Posts: 4,470
jumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud of
Default Re: Style isn't allowed...

If you need to insert a style to an html element, you can do it in one of three ways. One, like Bagi said, you can link to it in the head of your document, or you can put it directly into your document head (between the head tags), or you can place it in your element itself. For instance, if you want to center a paragraph you could use:

Quote:
<p style="text-align:center;">Paragraph</p>

To use the <style> tag, place it within the <head></head> tags.
__________________
Storage Sheds
Lost Forum
jumpenjuhosaphat is offline  
Old 10-03-2007, 04:28 PM   #4
Chart Music
iWEBTOOL SEO Advisor
 Contributor 
 
Chart Music's Avatar
 
Join Date: May 2006
Posts: 1,252
Chart Music has a spectacular aura aboutChart Music has a spectacular aura aboutChart Music has a spectacular aura about
Default Re: Style isn't allowed...

Quote:
Originally Posted by jumpenjuhosaphat View Post
To use the <style> tag, place it within the <head></head> tags.
Thank you
This is what I've just done and that warning is gone, will continue cleaning code and might try one of other above methods before I'm done.
__________________
Eco Tours | Gift Baskets

See a good post?
<--Give thanks by clicking left of post.
Chart Music is offline  
Old 10-03-2007, 04:37 PM   #5
OldWelshGuy
iWEBTOOL SEO Advisor
 Contributor 
 
OldWelshGuy's Avatar
 
Join Date: May 2007
Posts: 675
OldWelshGuy will become famous soon enoughOldWelshGuy will become famous soon enough
Default Re: Style isn't allowed...

I would use external style sheets as it makes it easier to make global changes. I would seriously warn about code clutter in each page.
__________________
Umbrella Consultancy Internet Marketing Company - Rugby Forum - Google Expert Blog
OldWelshGuy is offline  
Old 10-03-2007, 05:14 PM   #6
jumpenjuhosaphat
 Contributor 
 
jumpenjuhosaphat's Avatar
 
Join Date: Jun 2006
Location: Denver
Posts: 4,470
jumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud of
Default Re: Style isn't allowed...

I agree OWG. It's okay to use inline styling for instances when you only need to use it once, but it's so much easier if you reuse the same styling over and over if you can. I have never used style tags, I don't see the point when you can link to an external style sheet, it helps keep the code easier to read.
__________________
Storage Sheds
Lost Forum
jumpenjuhosaphat is offline  
Old 10-03-2007, 10:15 PM   #7
Alan
Junior Guru
 
Alan's Avatar
 
Join Date: Nov 2006
Location: Ayr, Scotland
Posts: 626
Alan has a spectacular aura aboutAlan has a spectacular aura about
Default Re: Style isn't allowed...

Absolutely right, use in order of preference
1 external style sheets
2 embedded style
3 inline style

Using external style allows reusable styles across all pages, style consistency modified across all pages by modifying a single style sheet.
Using embedded styles resricts the style to the current document, but modifies all applications of the style in the document.
Using embedded style is too much like hard work trying to maintain all the styles for consistency on a single page never mind more than one page.

Dont forget to add in the media element so that display on handhel/print/screens appear in the appropriate format.
Quote:
<link href="/css/style.css" rel="stylesheet" type="text/css" media="screen">
__________________
ahb Solutions
Alan is offline  
 
This is an Ad Revenue Sharing forum Place your advert here
Webmaster Tools Webmaster Tools Click Here
Closed Thread

(Threads which have no activity for more than 30 days are automatically closed.)



Quick Reply
Message:

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Am i allowed to have adsense in my url? Internetwiz Adsense 0 06-19-2007 05:41 AM
Affiliate Links Allowed? dhscott Discuss iWEBTOOL 0 04-21-2007 04:21 PM
MsXLabs Organization & M-Force Style (Plastic Blue vB Style) NeutralizeR Website Reviews 2 07-16-2006 12:38 AM
Forums Reviews Allowed Here? a1whs.com Website Reviews 13 06-11-2006 12:44 AM


All times are GMT. The time now is 05:20 AM.


Powered by vBulletin v3.6.7 © 2008, Jelsoft Enterprises Ltd. SEO by vBSEO © 2006, Crawlability, Inc.