XHTML 1.1 Woes

  • Thread starter Shannon
  • 27 comments
  • 1,467 views
15,799
  1. Line 3, column 39: value of fixed attribute "xmlns" not equal to default
    Code:
    <html [color=red][b]xmlns="http://www.w3.org/TR/xhtml"[/b] [/color] xml:lang="en" lang="en">
  2. Line 8, column 17: there is no attribute "language" (explain...).
    [/list=1]
    Code:
    <script [color=red][b]language="JavaScript"[/b][/color] type="text/javascript" src="include.js"></script>

    The first one has me completely stumped. And the second, well, I thought you had to have a 'language' attribute for a script. :confused:

    Anyone care to help?
 
Line 3 should be:
Code:
<html xmlns="http://www.w3.org/1999/xhtml">

For line 8... you're actually not supposed to have a language attribute in a script tag. It was used for some time, but it's been deprecated for XHTML, because it's useless (except for maintaining compatibility with really old browsers). The type="text/javascript" declaration is more than enough.
 
Originally posted by Sage
Line 3 should be:
Code:
<html xmlns="http://www.w3.org/1999/xhtml">

For line 8... you're actually not supposed to have a language attribute in a script tag. It was used for some time, but it's been deprecated for XHTML, because it's useless (except for maintaining compatibility with really old browsers). The type="text/javascript" declaration is more than enough.
I was counting on you to come in and answer, Sage. Thanks! 👍
 
Gah! More problems! :grumpy:

Sorry, I am unable to validate this document because on line 37 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.

Line 37 is just a plain ol' paragraph though:
Code:
<p>Welcome to the new Digital Junkyard version 3. Digital Junkyard is an...</p>

:odd:
 
Originally posted by Shannon
I was counting on you to come in and answer, Sage. Thanks! 👍
No prob. :D

Originally posted by Shannon
Gah! More problems!
Now that is odd... is that everything in your paragraph, or is there more text? If there's more, then there might be a symbol or what not that's not properly encoded.

If that's all there is, then we'll have to start with the beginning, just to make sure... does your document start out with all of the following, exactly?:
Code:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

And, do you have the following line in your <head> section?:
Code:
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
 
Originally posted by Sage
Now that is odd... is that everything in your paragraph, or is there more text? If there's more, then there might be a symbol or what not that's not properly encoded.
There is more, but it's just plain english letters.

The full paragraph is:
Welcome to the new Digital Junkyard version 3. Digital Junkyard is an online digital art portfolio of Shannon Edwards. Throughout the website you will find wallpaper and some of my other digital art creations, photos I've taken and a large collection of my favourite links.

If that's all there is, then we'll have to start with the beginning, just to make sure... does your document start out with all of the following, exactly?:
Code:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

And, do you have the following line in your <head> section?:
Code:
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
Yes. Exactly.

...I thought you said XHTML 1.1 was easy to get to validate! :grumpy:
 
Well, it would seem as one problem is solved, another arises.

]
1. Line 40, column 188: there is no attribute "target" .

Line 40 is as follows:

Code:
<a href="http://validator.w3.org/check/referer" [b][color=red]target="_blank"[/color][/b]>Re-validate</a><br />

How am I supposed to get the link to open in a new window if XHTML doesn't like the target="_blank" declaration?
 
Like i said, use javascript. :rolleyes:

Oh, and sage, do you know how i can get around XHTML with the bordercolor attribute for tables?

I have a table with the bordercolor attribute, but XHTML doesnt like it.

What could i use? I tried border-color: blah in a css file, but it comes out all funky....

Thanks. :)
 
Originally posted by Shannon
...I thought you said XHTML 1.1 was easy to get to validate!
Hey, these are pretty small problems compared to some of the stuff I'm trying to get my head around right now. :P (I've developed a navigation system that has CSS-image-rollovers, with full 508 accessibility conformance [Fahrner image replacement technique] and no flickering due to the background-positioning trick, but I'm having trouble applying a class to the links, or specifically, the list item, without using a method that would bloat my code... complicated stuff :boggled:)

Originally posted by Shannon
Hmmm....it seems changing the character set from utf-8 to iso-8859-1 does the trick.
Now that really is strange... my page has always validated with utf-8, and it even has a few asinine symbols and what not in it. *shrugs*

Originally posted by Shannon
How am I supposed to get the link to open in a new window if XHTML doesn't like the target="_blank" declaration?
The targe property was removed from XHTML strict guidelines to promote accessibility... you can go two routes with this. Either change your DOCTYPE back to transitional (which I'm assuming you don't want to do), or, as Acid X said, use Javascript. The W3C is going to be coming out with "XLink" as a replacement for "target", but that won't be for a while.

Originally posted by Acid X
Oh, and sage, do you know how i can get around XHTML with the bordercolor attribute for tables?

I have a table with the bordercolor attribute, but XHTML doesnt like it.

What could i use? I tried border-color: blah in a css file, but it comes out all funky....
Um, what do you mean by funky? Does it not apply, or does it apply but not the way you thought it would?

For a start, instead of using border-color, I'd recommend you just tell the browser everything with the border property (I'll show that in a sec). Also, do you have the proper selector(s)? Do you want to apply it to every table on your website, just one table, or several tables (but not all)? If you want it for every table, you would do something like this:
Code:
table {
      border: 1px solid #000;
}

For just one table, you would put id="blah1" in the table tag, then put this in the CSS:
Code:
table#blah1 {
      border: 1px solid #000;
}

And for multiple tables, but not just one (and not all), you'd put class="blah2" within every table you want affected, then the following in your CSS:
Code:
table.blah2 {
      border: 1px solid #000;
}
 
Oh, BTW Shannon, you're going to remove that border on one of your images, right? ;)
 
Originally posted by Sage
Hey, these are pretty small problems compared to some of the stuff I'm trying to get my head around right now. :P (I've developed a navigation system that has CSS-image-rollovers, with full 508 accessibility conformance [Fahrner image replacement technique] and no flickering due to the background-positioning trick, but I'm having trouble applying a class to the links, or specifically, the list item, without using a method that would bloat my code... complicated stuff :boggled:)
Well, if I know you, I take ityou've read this article? Other than, all I can say is...good luck! 👍

The targe property was removed from XHTML strict guidelines to promote accessibility... you can go two routes with this. Either change your DOCTYPE back to transitional (which I'm assuming you don't want to do), or, as Acid X said, use Javascript. The W3C is going to be coming out with "XLink" as a replacement for "target", but that won't be for a while.
Looks like I'm going to have to pull out the old javascript code then. :irked:

I found this article for anyone interested. You basically add the XHTML compliant rel="external" attribute to your link and let a bit of Javascript do the rest.


Oh, BTW Shannon, you're going to remove that border on one of your images, right? ;)
Yeah. I fixed that on my local copy of index.htm; just haven't got round to editing the server copy of it. ;)
 
Ah, thanks sage. By funky i mean, it comes out looking all wrong, like only some of the border color is changed..
 
Sage, can you help me again? Whats wrong with this:

Line 21, column 13: there is no attribute "scroll" (explain...).
<body scroll="no" onLoad="InitialiseScrollableArea()">
^
Line 21, column 25: there is no attribute "onLoad" (explain...).
<body scroll="no" onLoad="InitialiseScrollableArea()">
^
Line 140, column 63: there is no attribute "onMouseOver" (explain...).
...f="javascript: void(0);" onMouseOver="PerformScroll(-10)" onMouseOut="CeaseSc
^
Line 140, column 95: there is no attribute "onMouseOut" (explain...).
...Over="PerformScroll(-10)" onMouseOut="CeaseScroll()"><img src="img/arrowu.gif
^
 
Originally posted by Shannon
Well, if I know you, I take ityou've read this article?
Yup. Though, I'm using a slightly modified version of that technique, but still based on the same concept. :)

Other than, all I can say is...good luck! 👍
Thanks! I've actually got it working now... had a hard time at first though making it coexist with IE/Win.

Originally posted by Acid X
Line 21, column 13: there is no attribute "scroll" (explain...).
<body scroll="no" onLoad="InitialiseScrollableArea()">
^
Okay... problem with that is, it's been deprecated, and you can use CSS to accomplish the same effect:

Code:
body {
      position: fixed;
}

Though, one big problem with that is that IE doesn't understand the "fixed" property (stupid POS!). So, you'll have to use this hack to get it to work.

Line 21, column 25: there is no attribute "onLoad" (explain...).
<body scroll="no" onLoad="InitialiseScrollableArea()">
^

Line 140, column 63: there is no attribute "onMouseOver" (explain...).
...f="java script: void(0);" onMouseOver="PerformScroll(-10)" onMouseOut="CeaseSc
^
Line 140, column 95: there is no attribute "onMouseOut" (explain...).
...Over="PerformScroll(-10)" onMouseOut="CeaseScroll()"><img src="img/arrowu.gif
^
Now all of this has to do with Javascript, which I rarely deal with, so to be honest, I'm not sure what to do. The best advice I can personally offer is to link it to an external .js file, and reference it when needed.
 
Gaah! I'm trying to get my website validated also... However, I get a large amount of errors because geocities inserts a horrendous amount of code for an ad that I cannot control. It's basically a script that is dumped after the <./html> tag and I have put <noscript /> there but this doesn't work.

Also, I get these errors which I have no clue how to fix for the main document.

Line 2, column 42: value of fixed attribute "xmlns" not equal to default
<html xmlns="http://www.w3.org/1999/xhtml/">
^
Line 9, column 7: element "center" undefined (explain...).
<center><img src="http://www.geocities.com/matrixhasu77/images/biohazardlogo.jpg
^
Line 34, column 11: document type does not allow element "noscript" here (explain...).
<noscript />
^

I have been wondering about that center tag as I am sure there is a way to control it. I think I have an idea about that though. Incidently, my page would probably be valid XHTML 1.0 if Yahoo wouldn't stick that ugly ad script on my page or if I knew how to fix those three errors. Here's the validation page. It's hideous. :(

I really need a better host... geocities is horrible. They don't follow XHTML standards at all.
 
Originally posted by Matrixhasu77
I have been wondering about that center tag as I am sure there is a way to control it. I think I have an idea about that though.
Instead of using the <center></center> tags, use <div align="center">Blah blah</div>

I really need a better host... geocities is horrible. They don't follow XHTML standards at all.
I'm using Freewebs at the moment for my validation, as they don't implement ads. When I switch from 56K to DSL, I'm going to use 10mb of free space the ISP offers.
 
Line 2: Try removing the last forward slash (after xhtml and before the closing quote).

Line 9: Take out the <center> tags (as I've noticed you've done), then fix your CSS... you're missing the closing bracket for your div#logo selector. ;) Also, you want to either center the division or center the image... so, use either of the following:

Code:
div#logo {
      text-align: center;
      width: 100%;
}
or
Code:
div#logo {
      margin: 0 auto;
      width: [i][width of biohazard.jpg image][/i]px;
}

On that note, make sure you always specify the height/width for your images.

I see that you already have line 34 fixed, and as for the rest, I don't think you can do anything about it, due to Geocities. :indiff:
 
Originally posted by Shannon
Instead of using the <center></center> tags, use <div align="center">Blah blah</div>
Nuh uh! The align property has been deprecated for XHTML strict guidelines. ;) You have to use CSS.
 
Originally posted by Sage
Nuh uh! The align property has been deprecated for XHTML strict guidelines. ;) You have to use CSS.
Yeah, or that. But to center align a div you have to use negative margins, which technically, is against CSS rules.

I use negative margins to vertically align my Container div, and thte W3C validator says my CSS file is valid though.
 
Originally posted by Shannon
Yeah, or that. But to center align a div you have to use negative margins,
Or the technique that you linked to in your next post, which is what I always use. ;) I've always just set my body selector to text-align: center, then change everything else when necessary. 👍

[...]which technically, is against CSS rules.

I use negative margins to vertically align my Container div, and thte W3C validator says my CSS file is valid though.
Uh, where'd you hear that it's against the rules? AFAIK, it's always been perfectly standard, and if the W3C wanted it to not be standard, they could easily add that into the validator, since it would just have to look for a hyphen with a margin property.
 
Originally posted by Sage
Uh, where'd you hear that it's against the rules? AFAIK, it's always been perfectly standard, and if the W3C wanted it to not be standard, they could easily add that into the validator, since it would just have to look for a hyphen with a margin property.
I heard it somewhere. Oh well, your the CSS geek of GTP, so I'll take your word for it...:D
 
Originally posted by Shannon
Oh well, your the CSS geek of GTP, so I'll take your word for it...:D
Heh heh, it's always nice to hear that you're the best at something. :D (We can forget the fact that it's just within the GTP population. :P)
 
I have a question... how do you control an image that is hyperlinked so that a border that shows that it is a link does not appear around the image using CSS?

I have a selector set up for my image galleries, but I don't have the CSS set up so that it automatically gets rid of the border. I ask because in XHTML you cannot use the code border="0" and I don't know what to use instead.
 
Code:
img {
      border: 0;
}

Try that. :) If that doesn't work, then try this:

Code:
img a {
      border: 0;
}
 

Latest Posts

Back