Jump to content

Validation concerns?


L.Adlon

Recommended Posts

Hi. I ran my updated website through a validator, cleaning up things it finds, but there's a few items I'm not sure about... whether I should be concerned, and how I would remedy them (if they really needs to be).

 

Here's some of them. Please let me know if this is something critical, or I can just let them slide (for my own personal website, not a clients or anything):

 

-My <meta> are using 'proprietary' description and keyword attributes.

 

-A table is using a proprietary height attribute

 

-Some of my <td> use proprietary background attribute

 

-On my music page, the <audio> (from an HTML5/Flash mp3 player code (MediaElement Player) I got from the web) uses proprietary type attribute.

 

-This last one is a bit trickier... Using that MediaElement Player, I have an <audio> (with some attributes) and <script>$('audio,video').mediaelementplayer();</script> after it, for each of the sample songs I have. Everything works great, but the validator gives me an error about the id='player2' in each of those <audio>. Looking at it now, that makes sense, since id's can only be for one item. Fair enough.... However, I'm not sure if I can just change the id names, as I assume there is probably a script or something referencing that. I'm not sure how to check that (or if I even can)... I don't do scripting, for one thing, and I'm sure I won't follow the scripting logic anyway. Again, it seems to run just fine, but I'm not sure if it's a problem.

 

 

So, those are the issues the validator found. I know ideally, I'd address them all, to be 'up to standards'... but are any of them really critical (...would break on some platform)? If so, what platform would have trouble with them, and how might I address them?

 

Hope you can help. Thanks.

Edited by L.Adlon
Link to comment
Share on other sites

Does your <meta> look like:

<code>

<meta name="description" content="Free Web tutorials"><meta name="keywords" content="HTML,CSS,XML,JavaScript">

</code>

But with 'proprietary' description and keyword attributes. If so then I do not see a problem. Now a <meta> that does not look like one of the above may cause problems with the validaror.

Link to comment
Share on other sites

Why post a laundry list of errors without including the lines of code that caused the errors?

 

Why would you have a height attribute in a table? Where do you see that listed as valid code?

 

Why would you ever give more than one element the same id?

Link to comment
Share on other sites

Replace all the height and background attributes with CSS. I'm not sure, without seeing your code, what the problem might be with the <meta> tags.

Link to comment
Share on other sites

Hi, guys. Okay, to answer all your questions...

 

1) Yes, the <meta> looks like that... HTML4 style? I'm not aware of HTML5 style, if there is one. Even so, the pages are (currently) set with HTML4.01 DOCTYPES. I'm really not sure what the deal is there. I'm just using the standard 'keyword' and 'description' attributes. No idea why those are considered proprietary. If anything, I would just think that they are obsolete or pointless (not used by search engines?)... but not proprietary.

 

The structure is just like this: <meta keywords="planes, trains, automobiles" /> (Yesterday, I added the closing /, as the validator pointed the lack of them) Question is, will this break the site, or (at worst) the meta data gets ignored in some cases?

 

2) I wasn't aware that the <td background="image.jpg"> was proprietary, until now. I am using <img> in the <td>'s for most of the items (...the literal frame of my website), but (believed) I had to use <td background> for certain ones... like for cells that had flexible lengths, and for backgrounds. For the background ones, I figure I can use CSS (...I'll have to give that a go). For the flexible length cells, it's a bit trickier (...and something we discussed in another thread). I understand that repeating image tiles within a flexible length <div> can certainly be done, I've struggled with it (and the explanation of what to do to actually make it work). I'll give it another go, though. Up to now, I've had a 'fallback' of setting the cell color, in case the image is not displayed. But, ya, I'll see if I can get the CSS alternative happening. I'm not denying it can be done... it's just whether I can get it to work myself. I still have my battles with CSS, despite really wanting to be 100% in.

 

3) The ID thing is tricky... I'm fully aware that an ID can only be used by one item, but the problem is, I'm using someone else's scripts. This is the MediaElement player I'm using. On my site, I have individual songs listed, and a player for each (using a combo of an <audio> and a <script> thing, outlined in my initial post above). This coding, required by the player, includes an ID=player2 in the <audio>.

 

Now, even to me, it's clear that if I have multiple instances of the <audio> (for each song), you have a conflict, as the ID SHOULD be unique for each one. Easy enough for me to change the ID=Player2 to Player3 or whatever... The problem is, I have no idea what (if any) scripts or other elements are referencing that... and I would assume that they are hard coded to reference 'player2'. Me not being a script guy, I coudln't go in and modify the script so that it references several IDs... I'm not even sure how that would work. The way it's coded, it seems like you could only have ONE instance... and therefore only ONE song, since they use ID. Why not use CLASS instead? I don't know... So, there seems to be a conflict, and I'm not sure how (or if) it can be addressed.

 

The player doesn't seem to support multiple mp3 files... but, I could be doing it wrong, or something. (I tried doing the usual song1.mp3|song2.mp3|song3.mp3 thing in the attribute, but that just broke it).

 

Weird thing is, it seems to work just fine, regardless.

 

4) Regarding the height attribute in the table.... Well, you are going to shoot me for this, but I was forced to use the old trick of encasing the website in a 100x100% table in order to center it vertically. I tried (...really, really hard) to do it pure CSS, but I just couldn't get it happening. I'd be more than happy to replace it with CSS if I could get it to work. I replaced all the other uses of tables for formatting now... but this one (my splash logo screen) just wouldn't vertically center with CSS.

 

Again, not saying it can't be done (...although doing searches on the web reveal a lot of arguments, and solutions that are promptly followed by someone pointing out how they WILL break). I'm not an expert, so I'm sure I'm oblivious to many methods, and am doing my share of mistakes and such... I'm really trying to move completely to CSS (with some success), but some battles continue.

 

I've added coding and scripting from various other sources... some work, some partially work, some break with a vengence... but, more importantly, the coding of my page quickly becomes very unfamiliar and cryptic to me. That's one of the big problems with grabbing other people's scripts and such. I'm a one-man-band here... site design, building, maintenance, etc... so if things get all cryptic and foreign to me, I have no idea how to fix things when thing go weird.

 

Almost there... The site code has definitely been cleaned up, made more compatible and stable, and is ALMOST full CSS. Learning as I go...

Edited by L.Adlon
Link to comment
Share on other sites

Your <meta> tag isn't right, even for HTML 4.01. You're using "keywords" and "description" as attribute names rather than meta names. A meta name is within the name attribute.

 

It needs to be like this:

<meta name="keywords" content="key, word">

I don't have a lot of time these days so I can't go through your whole post at the moment.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...