StatCounter User Forum  
StatCounter Free web tracker and counter

Go Back   StatCounter User Forum > Webmaster > Lounge (non-StatCounter related topics here!)

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 10-05-2005, 11:29 PM
jwalsh98 jwalsh98 is offline
Member
 
Join Date: Oct 2005
Location: Alberta
Posts: 195
Default Can some explain the w3 validator

I am very new at being a webmaster and to html. I did most of the coding myself by hand through different online tutorials. I ran my website through http://validator.w3.org and I received a lot of error codes and i really do not understand them. Everything on my page seem to show up perfectly well but i would like to fix any mistakes so that my website will run smoothly.
Quote:
Error Line 33 column 30: there is no attribute "color".
The color i picked shows up fine. Could this be coincidental?
Quote:
Error Line 33 column 39: element "font" undefined. Line 33 column 42: element "B" undefined.
I am not sure why it is undefined. I seem to have a lot of these.
Quote:
Line 33 column 104: reference not terminated by REFC delimiter.
I have no idea at all what this means... and the list goes on. If some one would love to be really helpful and explain this stuff to me, I would really appreciate it. Thank you
__________________
Jacqueline


Visit the Largest Online Database of FREE Marketing Ideas
Over 500 Marketing Ideas Spanning 22 Types of Marketing
  #2  
Old 10-05-2005, 11:56 PM
easethan easethan is offline
Member
 
Join Date: Sep 2005
Posts: 100
Send a message via AIM to easethan Send a message via MSN to easethan
Default

The problem is that you are using numerous outdated methods of coding your page. Browsers still support these methods, to keep old pages from breaking, but if you are designing a new website, you should use XHTML, which is the newest version of HTML.

One difference between HTML 4 and XHTML is that XHTML requires that you use CSS to tell the browser how your page should look. Also XHTML gets rid of the these tags, and others: font, b, i, u.

Before going on you should read these two tutorials:

http://www.w3schools.com/xhtml/default.asp
http://www.w3schools.com/css/

They are long, but you should read them completely.
  #3  
Old 10-06-2005, 02:02 PM
Nomad Nomad is offline
Senior Member
 
Join Date: Nov 2004
Posts: 732
Default

just looked at your page and your using xhtml 1.0 strict? well a few mistakes.. things like your line breaks
- writing it like that is html 4.01 not xhtml. In xhtml most stuff is implicitly closed like so
notice I've added a space and forward slash not just forward slash as some have a tendecy to do and is wrong.

problem is your page code not written correctly in some place or implicitly closed correctly.

Nice work though and pleased to see your trying to get up to standards
  #4  
Old 10-06-2005, 02:06 PM
Arne's Avatar
Arne Arne is offline
Moderator
 
Join Date: Sep 2004
Location: Lulea, Sweden
Posts: 5,465
Default Re: Can some explain the w3 validator

Quote:
Originally Posted by casinoratings
I have no idea at all what this means... and the list goes on. If some one would love to be really helpful and explain this stuff to me, I would really appreciate it.
Quote:
Originally Posted by easethan
The problem is that you are using numerous outdated methods of coding your page. Browsers still support these methods, to keep old pages from breaking, but if you are designing a new website, you should use XHTML, which is the newest version of HTML.
The site is using XHTML, from what I can see. But in my opinion somebody who relly new to HTML should not use it. HTML strict is still just as good as XHTML strict for everyone.

In XHTML attributes and elements must be all lower-case. That's what the validator tells when saying "element 'B' undefined" ("B" is upper-case).

The attrubutes "color" and "font" is not HTML, it's styling the content and must be used only with style (e.g. <p style="font:arial"> ) or better yet, in a external style sheet.

Most errors is explaned under eatch error message. Some of them with several possible solutions that makes it easier to test, others can be more difficult to understand and need more use of the authors brain to solve

The errors "reference not terminated by REFC delimiter" is explaned with " If you meant to include an entity that starts with '&', then you should terminate it with ';'." So adding the ; to eatch &nbsp will eleminate the errors, since all entity must allways start with & and end with ;

One more useful site to learn HTML and CSS is http://www.htmldog.com and there are others, but so far you now have some "starters"
  #5  
Old 10-06-2005, 08:48 PM
jwalsh98 jwalsh98 is offline
Member
 
Join Date: Oct 2005
Location: Alberta
Posts: 195
Default Re: Can some explain the w3 validator

Thank you for your help so far. I am pretty sure that I am doing this right
Code:
<p class="center">[img]pacific.jpg[/img]</p>
but the image displays to the left. Does anyone see any obvious problems with this code? Is there a different way to center images. I have been reading through the websites that were suggest and I guess I haven't been able to find it. Please help
__________________
Jacqueline


Visit the Largest Online Database of FREE Marketing Ideas
Over 500 Marketing Ideas Spanning 22 Types of Marketing
  #6  
Old 10-06-2005, 08:53 PM
robinev robinev is offline
Senior Member
 
Join Date: Jul 2004
Location: Seattle WA USA
Posts: 906
Default

The code you included there wouldn't do anything unless you have a class called "center" that includes the appropriate CSS attributes.

It's not a good idea to use this name because of possible confusion, but something like this would work if it were included within your CSS definitions:
Code:
.center {text-align: center}
But "center" is meaningless as a CSS class without a definition using the name.
  #7  
Old 10-06-2005, 08:56 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,177
Default

What class is that "center"? do you have any such class defined in your style sheet? Probably not and you're confusing align="center" with class="center" .

But align is not allowed in XHTML, so you must use class. If you use class, you must have it defined in the css file.

Best to avoid usign the common name center though, call it something else.

Say it will be class="myclass1"

and in the css file you have:

Quote:
.class1 { text-align: center; }
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #8  
Old 10-06-2005, 09:07 PM
trackerm's Avatar
trackerm trackerm is offline
Master Member
 
Join Date: Oct 2003
Location: Sydney, Australia
Posts: 3,248
Default

Hi Jacqueline

I never reply to gambling posts... so *deep breath* here I go...

If your website works the way you want it in all browsers then in my humble opinion (which is always right) you can tell w3c validation to go to hell It will find a lot of on-line gambling people too so it will have company

Mark
  #9  
Old 10-06-2005, 10:53 PM
easethan easethan is offline
Member
 
Join Date: Sep 2005
Posts: 100
Send a message via AIM to easethan Send a message via MSN to easethan
Default Re: Can some explain the w3 validator

Quote:
Originally Posted by Arne
The site is using XHTML, from what I can see. But in my opinion somebody who relly new to HTML should not use it. HTML strict is still just as good as XHTML strict for everyone.

In XHTML attributes and elements must be all lower-case. That's what the validator tells when saying "element 'B' undefined" ("B" is upper-case).
Yeah, you're right, my mistake. I was kind of mixing in the point that css should be used instead of i, u, and b tags.
  #10  
Old 10-06-2005, 11:11 PM
easethan easethan is offline
Member
 
Join Date: Sep 2005
Posts: 100
Send a message via AIM to easethan Send a message via MSN to easethan
Default Re: Can some explain the w3 validator

Quote:
Originally Posted by casinoratings
Thank you for your help so far. I am pretty sure that I am doing this right
Code:
<p class="center">[img]pacific.jpg[/img]</p>
but the image displays to the left. Does anyone see any obvious problems with this code? Is there a different way to center images. I have been reading through the websites that were suggest and I guess I haven't been able to find it. Please help
You've probably read everything everyone here has said about classes, so I hope this is not moving to fast for you:

Classes should generally be used only for elements that appear on every page, or often on pages. For something that appears only once or twice throughout the site it would be better to use the id attribute of the p tag(the element) to define it's style.

So you would use:

Code:
<p id="pacific_image">[img]pacific.jpg[/img]</p>
Along with this in your css file or header area:

Code:
#pacific_image {
 text-align: center;
}
This is mainly to avoid cluttering of your CSS file, by separating classes, which are used for common elements, from style declarations(the one using the id) used for one or two instances of an element.

If you are sure that the element will only be used on one page it is even better not to use the id method, but rather to declare the style once right on the page. Many people will tell you otherwise, and everyone to their own way, but I find that using the style attribute to declare the style for content elements(like to center an image in a blog post, etc.) to make more sense. This is because the content of a page may change a lot, depending on how much you update it, so adding to the CSS file every time you want to center text or an image becomes tedious and unnecessary, and clutters the CSS file, making it harder to work with.

So for elements that will not be updated a lot, such as images and divs for the layout, use a class in the CSS file. But for actual content that will be updated, use an inline style declaration so you don't have to go to the file, find the class name, then go to the CSS file and find the class in there, just to edit the text alignment.

This is how you use an inline style:

Code:
<p style="text-align: center;"><img...></p>
Closed Thread

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

Forum Jump


All times are GMT. The time now is 03:49 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.