• Hi all. We have had reports of member's signatures being edited to include malicious content. You can rest assured this wasn't done by staff and we can find no indication that the forums themselves have been compromised.

    However, remember to keep your passwords secure. If you use similar logins on multiple sites, people and even bots may be able to access your account.

    We always recommend using unique passwords and enable two-factor authentication if possible. Make sure you are secure.
  • Be sure to join the discussion on our discord at: Discord.gg/serebii
  • If you're still waiting for the e-mail, be sure to check your junk/spam e-mail folders

Having W3C take a look at the site

blueparukia

The Sexy Nerd
Yeah, but Serebii is an old site, and is just full of crap code. I did this ages ago, and at Serebii's size, if he got this coded in valid xHTML strict while minimizing the byte size (putting js and CSS into external files) and killing that stupid splash page, he could save a fair bit of bandwith.

Serebb=ii hast to be 7 or 8 years old now, though the code is still fairly bad for back then (uppercase HTML, wtf?). I did recode the template a while back to be opimized to load faster, made proper use fo heading tags, I validated it xHTML Strict and moved everything to external files.I have bad habit of recoding sites I visit alot - Serebii, Google and eBay are prime examples. Removed all <br/>s, <center>s, <fonts>'s etc. - everything you don't need in a layout. The mnu became one big unordered list.

I should check and see if I still have that...
 

Evil_Lathander

Pokémon forever
well, firefox has a few good add-ons for web developpers.

CSS viewer
Tiny Validator(which contains a cleanup option, which you can use to indent all code)
and the web-developper toolbar offcourse...

Personnaly, I'm in my first year of learning about websites.

I know most of the HTML codes and also some CSS. Haven't gotten to Javascript, DOM, PHP or ASP.NET yet
 

Disgruntled Goat

has his moments
the code is still fairly bad for back then (uppercase HTML, wtf?). I did recode the template a while back to be opimized to load faster, made proper use fo heading tags, I validated it xHTML Strict and moved everything to external files.I have bad habit of recoding sites I visit alot - Serebii, Google and eBay are prime examples. Removed all <br/>s, <center>s, <fonts>'s etc. - everything you don't need in a layout. The mnu became one big unordered list.
I took a quick look at the code, maybe it was different when you looked before but there IS and external style sheet and there is hardly and javascript. Uppercase HTML tags are totally valid in strict HTML (but not XHTML). Changing the menu to use list tags would take up MORE bytes: ie <a ...>link</a><br> would become <li><a ...>link</a></li> But there are still other things that can be cleaned up like you said.

Side note: I read an interesting argument against XHTML recently - if you think about it, it's pointless because you can just write your HTML following the rules of XHTML and then it's valid, clean code.

And 165 validation errors isn't too bad. Amazon.co.uk has over 1300!
http://validator.w3.org/check?uri=h...(detect+automatically)&doctype=Inline&group=0
 

blueparukia

The Sexy Nerd
I took a quick look at the code, maybe it was different when you looked before but there IS and external style sheet and there is hardly and javascript
I didn't really look at it, just a brief scan through so probably missed that. Even so, scripts that are in there (not google) use the language attribute, with no quotes.

Uppercase HTML tags are totally valid in strict HTML (but not XHTML)

Valid or not, it is very, very bad practice and should not be used after 1997. And Serebii is a mix of uppercase and lowercase, which is even worse.

<a ...>link</a><br> would become <li><a ...>link</a></li>

So? It is still the complete opposite of the right way to do things. It will not slow down things any more than they can be. You'd need more bytes to throw in a doctype too, but you still shuld have one.

And 165 validation errors isn't too bad

Rofl. Anything over 10 errors is too bad. 165 is crap. 1300 is crap's crap.


The tables are not needed when there is already a semi-div layout in place - use either divs or tables, and style them, you don't put divs inside <td>s when you could just directly style the div, or the td.
 

Serebii

And, as if by magic, the webmaster appeared...
Staff member
Admin
Serebii.net is an amalgamation of 8 years worth of coding knowledge...from when I started with none, to where I am now with the ability to write in completely compliant XHTML

The reason the pages are as they are, is due to the fact that recoding would take another 8 years in itself, and I'm not prepared to do that.

The fact is, as a personal preference, I prefer to do layouts in things such as tables rather than with divs and css to ensure maximum cross-compatibility between browsers. Until all browsers render CSS correctly, this is the way it has to be in my eyes. I'm not going to screw a portion of my userbase just for compliancy
 

blueparukia

The Sexy Nerd
8 years hey? So, so long ago...back when CSS for layouts was only deployable in IE. And yeah, recoding a site this size would be a near impossible task, since you use SSI on thousands of pages by the looks of it, I'd prefer to keep everything in a database, <obvious>but then your site would never respond with the amount of queris it'd have to process...</obvious>


There is of course nothing wrong with tables, I just find them harder to use than CSS, but I learnt divs first.
 

chaos on the internet

AAAAAAAAAAAAAAAAAAAA
I use tables occasionally in my layouts. While div/css positioning is nice in theory, it's neigh impossible to make grid like layouts that expand/contract in a sensible manner with them alone.

Use whatever makes sense.
 

Disgruntled Goat

has his moments
So? It is still the complete opposite of the right way to do things. It will not slow down things any more than they can be. You'd need more bytes to throw in a doctype too, but you still shuld have one.

I know using lists is more "semantic" but you were talking about minimising the byte size... and actually there is more of a difference than the HTML because you need to add several rules in your stylesheet to revert the look of the list (remove bullet points, left padding, etc)
 
Top