View Full Version : Are You W3C and CSS compliant?
Allinpoker.cc
Jan 1st 2008, 11:47 pm
List your site here if you are W3C and CSS compliant. If your not, find out how by checking your site at the W3C site checker.
My site ( www.allinpoker.cc ) is HTML 4.01 Transitional (http://validator.w3.org/check?uri=http%3A%2F%2Fallinpoker.cc%2F)and CSS Complaint (http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fallinpoker.cc%2F). :D
I'm still working on the HTML 4.01 Strict.
Are You?
soulscratch
Jan 2nd 2008, 11:21 am
<body>
<table border="1" cellpadding="0" cellspacing="1" width="100%">
<tr>
<td colspan="3" align="center" valign="middle" height="20">
<font size="20pt">
<object>
<a href="/" class="atitle"><img border="0" width="649" height="89" src="./pics/dotcclogo.jpg" alt="Click to Return to Allinpoker.cc Home - All You Need To Know In Poker"><BR><span class="atitle" title="Click To Return to Allinpoker.cc Home">All You Need To Know In Poker ™</span>
</a><br>
</object>
</font>
</td>
</tr><tr>
<td colspan="3" align="center" valign="middle" height="20">
<font size="20pt">
<object><form target=_blank action="http://www.google.com/cse" id="searchbox_009763843474222221769:41jwrx7zfzw">
<input type="hidden" name="cx" value="009763843474222221769:41jwrx7zfzw">
<input type="text" name="q" size="25">
<input type="submit" name="sa" value="Search"><img src="http://www.google.com/images/poweredby_transparent/poweredby_000000.gif" alt="Google">
</form></object>
</font>
</td>
</tr>
<tr>
<td colspan="1" align="left" valign="top" width="20%">
<BR> <a href="/" title="Allinpoker.cc Poker Home Page"><span class="lmenu">Home</span></a>
Using tables for layout, presentational attributes, unsemantic markup, invalid values, I can go on.
You should not be proud of that markup, nor should anyone who still has presentational elements, classes, or attributes even on html 4.01 strict / xhtml valid pages.
Allinpoker.cc
Jan 2nd 2008, 3:03 pm
Uh... yeah... that's why I said I'm still working on strict... but Transitional is valid HTML 4.01. :confused:
So... how is your site? Or did you just come to this thread to talk crap? How about giving some suggestions on how to fix what you don't like? As it stands now, your post is absolutly useless to this thread and this forum.
:cool:
Dan Schulz
Jan 2nd 2008, 3:56 pm
soulscratch is one of the more vocal evangelists out there for clean, minimal, semantic and valid markup out there, so he can get a bit emotional at times.
That, and his job demands that he convert decade-old code into modern, accessible and usable Web sites as well.
As for me, I'm 100% XHTML 1.0 Strict and CSS 2.1 (both valid and warning free, of course).
lock
Jan 2nd 2008, 4:04 pm
not currently but i want to be so will be looking around this section for tips on "POSH" is it?
Thats a new term i've learnt today.
Dan Schulz
Jan 2nd 2008, 4:15 pm
Ah, "Plain Old Semantic HTML". Leave it up to Tommy Olsson and Roger Johannson. ;)
Allinpoker.cc
Jan 2nd 2008, 7:51 pm
For me, one of the most difficult things was to get my Magpie RSS (http://magpierss.sourceforge.net/)news feed to display with W3C compliance. I love the magpie RSS parcer (http://magpierss.sourceforge.net/), but the documentation and support was a little difficult. If you want to add RSS content to your website, magpie has to be the best way to go, though. After getting magpie working properly, I was upset to see the results were not W3C compliant. Those damn ampersands... what to do... A little creativity and research, and here we go... I'm sure a better way exists, and would be happy for someone to post it here. ;)
The php coding ended up looking like this in case anyone is interested, or needs the reference. You can see the results on my main page ( www.allinpoker.cc )
<?php
ini_set('display_errors', 0);
define("MAGPIE_OUTPUT_ENCODING", "UTF-8");
require_once("rss_fetch.inc");
$url = $_GET['url'];
$num_items = "10";
$rss = fetch_rss('http://www.allinpoker.cc/directory/rss.php?c=1);
$items = array_slice($rss->items, 0, $num_items);
echo "<ul>";
foreach ($rss->items as $item) {
// This section below replaces ampersands for w3c compliance
$item['link'] = str_replace("&", "&", $item['link']);
$item['link'] = str_replace("&", "&", $item['link']);
$item['link'] = str_replace("&&", "&", $item['link']);
$item['title'] = str_replace("&", "&", $item['title']);
$item['title'] = str_replace("&", "&", $item['title']);
$item['title'] = str_replace("&&", "&", $item['title']);
$item['description'] = str_replace("&", "&", $item['description']);
$item['description'] = str_replace("&", "&", $item['description']);
$item['description'] = str_replace("&&", "&", $item['description']);
$item['pubdate'] = str_replace("&", "&", $item['pubdate']);
$item['pubdate'] = str_replace("&", "&", $item['pubdate']);
$item['pubdate'] = str_replace("&&", "&", $item['pubdate']);
// Define attributes to be displayed
$href = $item['link'];
$title = $item['title'];
$description = $item['description'];
$pubdate = $item['pubdate'];
// Display the processed content
echo "<li><a target=_blank href=\"$href\">$title</a><ul><li>$pubdate</li><li>$description</li></ul></li>";
}
echo "</ul>";
?>
VimF
Jan 3rd 2008, 12:19 am
soulscratch is one of the more vocal evangelists out there for clean, minimal, semantic and valid markup out there, so he can get a bit emotional at times.
hmm... there might be quite a few who will call him semantic nerd.
Stomme poes
Jan 3rd 2008, 2:05 am
Hmm, the ampersands from PHP shouldn't ever show up in the HTML, so the validator should never see it. Ampersands within the html (like in links/urls for instance) should be & or the unicode one you used, &.
Oh, and my sites sure start out XHTML1.0 and generally CSS compliant (unless I need a Holly hack, not valid : ( but after they get set in a template by my colleague, who isn't quite so... anal about semantics shall we say? they get all sorts of <center> tags added, spaces above the doctype, single quotes mixing with double quotes, forms surrounded by fieldsets, spans holding divs, and JavaJunk crawling around in the HTML where it doesn't belong. But I usually manage to browbeat him into letting me see the code after he makes a change so I can make him validate it. But it's hard, it's like what's the point in writing it correctly if someone's going to come along and screw it up anyway?
So the hard-coded stuff is complaint yes. I may take my name off the end-product though : (
ChaosFoo
Jan 3rd 2008, 9:40 am
The site that I am currently working on is completely valid XHTML 1.0 Strict and CSS 2.1 with the exception of the use of a CSS expression to get min-width functionality in IE 6.
Frankitude
Jan 3rd 2008, 10:21 am
I validate, but I prefer to use the official XHTML/CSS validators at WWW consortioum http://w3.org
http://validator.w3.org
official validator for XHTML, XML and all HTML types, it also validates sitamaps
http://jigsaw.w3.org/css-validator/
official CSS validator
Good link-bait thought ;)
You'd be faster done if you've used w3.org validator API.
Allinpoker.cc
Jan 14th 2008, 11:14 pm
Hmm, the ampersands from PHP shouldn't ever show up in the HTML, so the validator should never see it. Ampersands within the html (like in links/urls for instance) should be & or the unicode one you used, &.
The problem is when magpie parses the RSS feed, the variable string it creates to be echoed does not have the amersands in the correct format, hence the need to replace the 'bad ampersands" information in the string with the correct code as above.
Stomme poes
Jan 14th 2008, 11:25 pm
Oh, you mean the parser is making the invalid code? It shouldn't, so maybe you've got to get another one. You shouldn't have a finished product and then have to re-write it to fix it.
Dan Schulz has a PHP parser that he's offered to people before. Maybe PM him?
Austell
Jan 15th 2008, 12:52 am
What is so great about being compliant anyway?
Like one wise man said - browser is the only validator...
Dondon2d
Jan 15th 2008, 12:57 am
soulscratch is just giving constructive criticisms, so you should not get mad or pissed or anything, you learn from it instead. My site freewarehunter.net is valid XHTML Strict and CSS, it has minimal design though.
blueparukia
Jan 15th 2008, 1:01 am
Search Engine Indexing, bragging rights, faster parsing.
Of course, validation means crap all if you are using things like tables and presentational tags...(even though I sometimes use <center>..).
Generally my pages validate xHTMl 1.0 Strict, with no tables or presentational tags. If for some reason CSS centering doesn't work I'll downgrade to Transitional and use <center>, although thats only happened twice.
I don't bother with CSS validity, its just a nice bonus, though most of the times my sites pass CSS by fluke...
Mooseman
Jan 15th 2008, 1:50 am
Last time I checked my site validated as XHTML transitional and CSS. Not sure right now, can't be arsed to check :)
Dan Schulz
Jan 15th 2008, 11:41 am
Oh, you mean the parser is making the invalid code? It shouldn't, so maybe you've got to get another one. You shouldn't have a finished product and then have to re-write it to fix it.
Dan Schulz has a PHP parser that he's offered to people before. Maybe PM him?
Deathshadow wrote the parser after I tried my own hand it at. I merely have it stored on a Web site I'm in the process of developing (despite being on the back burner). He wrote an update to one of the files, but I haven't incorporated it yet. Oh, and it uses XHTML syntax, but it can be converted to HTML with a few minor changes.
Stomme poes
Jan 15th 2008, 11:55 am
You mean it'll be on Minimal Markup?
Do you know why the Magpie parser is doing this with the &'s? Why would it (is it really written that way??)
Dan Schulz
Jan 15th 2008, 2:26 pm
Yes. As for Magpie, it's probably not escaping the amphersands. Other than that, I wouldn't know since I don't use it.
Allinpoker.cc
Jan 15th 2008, 3:51 pm
Magpie works well, other than this one issue, in my experience. I use it on multiple pages of my site, and it's quite flexible. Best thing is, it caches the news information for a set period of time, so that you don't overload the RSS server. Anyway, I just wanted to show the work-around, in case others using magpie want to use it. Once the php code is there, the work is done, and I doubt I'll look into using another parser anytime real soon.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.