Forum Moderators: open

Message Too Old, No Replies

P tags, tables, and validation

         

Brett_Tabke

1:19 pm on Nov 2, 2001 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



So, the last remaining bit of WebmasterWorld that won't validate, is right here in the threads. We do a few things here that I am stumped on moving to valid code.

The biggest ones are that we use <p> paragraph tags within tables. We also use <ul> tags for lists.

What do you suppose is the solution to get to valid code with this system?

Things I won't do here:
- CSS.
- Changes that involve browser sniffing.
- Major changes won't be considered.
- Anything that affects compatibility with the top 20 leading browsers including text based and se spiders.

Seems like there is a slick solution that I'm overlooking.

tedster

12:09 am on Nov 3, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd be glad to wrestle with this. but I'm not clear on the issues.

Do you mean the site has <p> tags that contain tables? If so, on what page/line does that happen? AFAIK, tables can contain <p> tags, just not the other way around.

Also, what's invalid about a set of <ul></ul> tags?

Brett_Tabke

8:52 am on Nov 3, 2001 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Try it:

  • Validate this page [htmlhelp.org] (I'd use the w3c's, but I can't get to it at the moment).

tedster

12:04 pm on Nov 3, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Brett,

OK. <ul> <p> and <table> are all block level elements. So I don't think it's <table> that's the problem here. On researching a bit, I think <font> is the inline element that may not contain either <p> tags OR <ul> tags.

INVALID:
<font>
<p>
<p>
<p>
</font>

VALID:
<p>
<font>
</font>
<p>
<font>
</font>
<p>

But that solution means denser code and higher bandwidth. I know you said no CSS, but wouldn't some simple classes declaring font sizes for <p> tags clear up a lot of this?

You wouldn't need to use an external file. You could declare them in the <style> tag in the head section, the way you do hover right now.

Brett_Tabke

7:15 pm on Nov 3, 2001 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Thanks Tedster. I don't know where I got it wired up that it was tables. Even went back to my test document and there was a stray font tag. Why, I don't know. I knew I just wasnt' reading something right there.

Anyway, thanks. I'll figure something out from there.

Ya, css is out. We have too many alternative operating systems here to consider it. Have lived through the compatability wars with Opera vs MS and losing, I swore I would never to do any one else what has been done to us over the last few years.