Worst code you’ve ever seen?

Once every now and then you come across code that is so ghastly, so terrible, that it almost makes you go blind! While fighting the pain, you (think) you can be almost sure of one thing: this must have been done on purpose!

Yesterday was one of these moments for me. I came across a web page, consisting of these parts, which I’ll try to describe below (without getting sick):

A sample of HTML errors

  • Two complete HTML documents, meaning that first one document started, from <html> to </html>, containing one part of the web page. That was then closed, and a new <html> element started the section containing some other parts.
  • The funkiest “double-closing” of a span tag I’ve ever seen: <span id="someKindOfIdThatICantDisplay" /></span>.
  • A complete mix of lower- and uppercase tags, in a table-based layout (yeah, what did you think?).

Some JavaScript weirdies

  • It had a nice onload event (naturally, applied directly to the body tag…), which changed the actual name of a hidden field in a form, during certain circumstances (instead of, I don’t know, changing its value?!).
  • A nice code branch trying to ensure Netscape 4 compatibility with document.layers. Guys, let me tell you: I’ve spent my fair share of pain-filled years making sure that things worked in Netscape 4. And what I remember is that Netscape 4 would, for no apparent reason, just crash in your face if it missed any single tag. With your “two-documents-in-one”-approach, there’s no way your script would even get the chance to run in that web browser.
  • A <BR> tag in one of the comments in the script block, like this: // This is for Netscape <BR>.

I guess by now you’re wondering who’s behind this. I can’t disclose that, but I can give you one code line as a hint to what technology they’re used to:

<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">

 

Think you’ve seen worse? I dare you! 🙂

71 Comments

  • Well, being a subscriber to The Daily WTF's Code Snippet of the Day, I can say that I've seen some really bad code. They don't just have html and js but examples of bad or just plain weird coding in almost every major programming language. For example: Hyperlink 2.0.

  • Arjan Eising says:

    I only miss the URI of this repulsive web site…

  • Dave Child says:

    Seen worse? I've written worse!

  • You're spoiled robert; I've seen far, far, faarrrrrrr worse code at some companies i've worked 😉

  • Phil Sherry says:

    I found this in our code not so long ago:

    <code> div#sidebar {

    float: right;

    width: 365px;

    display: inline;

    margin-right: 5px;

    background: #ddd;

    float: left;

    }</code>

    Maybe someone wanted to float something in the center? Needless to say, it's not a problem we'll be having these days.

  • Stephen Hill says:

    I have written worse!

    I remember, years ago, I wrote a website that ran of a javascript database created using many .js files and arrays. Example:

    <code>

    gdtotal = 25

    gdfolder = "applications"

    rnum = 0

    method="download"

    rnum++

    gd[tier][section][rnum] = new Array() //

    gd[tier][section][rnum][1] = "new" // Name of art

    gd[tier][section][rnum][2] = "more" // Author of the picture

    gd[tier][section][rnum][3] = "less" // Comments about the picture

    </code>

    An HREF tag might of looked like:

    <code>Windows MPlayer XP</code>

    Although my coding has change to the semantic web of today, I'm not embarrassed about my old code because I didn't have access to technologies like SQL Server and so had to make my own 🙂

  • Peter says:

    I think it'd be safe to say that we all most certainly have our own ghosts in the closet on the subject of bad code. The reasons may be many, from tight deadlines to simply a lack of better knowing. However I would rather work with a guy who makes mistake but wants to learn better, than with someone who thinks his/her code is the best in the world and would never admit to a mistake.

  • Peter says:

    …I've seen too many examples of coders with too much prestige who can't deal with people that don't meet "their standard".

  • RobertDM says:

    @ peter

    I can only speak from personal experience offcourse but the "cowboy-coders" who I've had to work with turned out to be the least open for discussion or improvement. The people open to web-standards and decent code I've worked with were much more open to discussion.

    But you're right: there's no improvement without mistakes, I've made many myself and will probably make quite a few in times to come.

  • Devon says:

    …I thought I'd seen it all, and then just yesterday I saw:

    <code><script language="Javascript" src="counter.php?page=INTRO"></code>

    ..as if that wasn't enough, the php file outputs:

    <code>document.write('3178');</code>

  • AndrÃ&A says:

    I don't know if it's worse… or even if it's bad, to begin with, but the christian in me thinks it's a sin:

    <code>obj.parentNode.removeChild( obj );</code>

    When that came out of my fingers, i stopped, looked at the screen and felt the panic creeping up. I had just commited the crime of accessory to a dom suicide. *shakes head* Please don't tell anyone.

  • Jens Meiert says:

    That's nothing! (Damnit, who was that guy from the Dilbert comics who always used to say that!?)

    There is a real breeding place for evil code, and that is called "advertisment providers". Support any initiative to fix that; see one of the latest picks on ad code ….

  • Binny V A says:

    I have seen bad code that can easily rival those given here. But its one snipet from one file, another from another program, etc. But in this case, all the code is from a single file – WOW!

  • Tommy Olsson says:

    One of the worst pieces of … code … I've seen is an internal system at the office, built by a contractor. It uses nested <code><html></code> tags, client-side VBScript and every other mistake you could imagine.

  • Stefan Van Reeth says:

    Ok, I admit, I've written code that is too dodgy to show the world. Or things that were ten times smaller after refactoring (when I learned what that meant ;)). Completely unreadable code, lengthy elaborate solutions that could have been solved in one command if I had known it at the time of writing. And the list goes on…

    But a splitted html file? Nope, never done that lol. Maybe there's hope for me after all :).

    @ André Luis

    Hilarious man, nicely found.

    @ Devon

    Actually, calling a PHP script from a script tag is not THAT bad. It's a convenient way to load arbitrary js without the overhead of implementing AJAX. Or to provide an alternative to AJAX altogether. I myself have used the same technique to load captcha's generated by GD into img tags (yup, works too). How it's done here is another matter off course…

  • Robert Nyman says:

    Thanks for sharing, everyone!

    Martin Jansson,

    Yep, the Daily WTF has some nice things. Thanks for the Hyperlink 2.0 link! 🙂

    Arjan,

    Ah, sorry, I really can't share it.

    Dave,

    I'm sure you have!

    Hayo,

    Yeah, maybe! 🙂

    Phil,

    Ah, a good ol' center float!

    Stephen,

    Well, we all have to start somewhere. As long as you evolve, it's fine with me.

    Peter,

    Most definitely. In the end it's about having a mindset that makes you learn from your mistakes and constantly try to get better at what you do.

    And people who don't deliver good code should get constructive help instead of just being dissed.

    If people have their personal web sites with pictures of their family , or something like that, I don't care at all about the code; I'm just happy that they want to share.

    What disturbed about where this code was found, though, is that it is delivered by a company that charges money for their application, and the specific context is money transfers. Doesn't feel to safe, now, does it? 🙂

    RobertDM,

    Yes, it's all about attitude. You can be the worst developer ever, but as long as you're willing to learn and discuss, there's hope.

    Devon,

    I guess the PHP file dynamically creates that number id. Still, though, I'd probably set that value to a variable in one file solely used for that, and then have the rest of the static JavaScript code in another.

    André,

    Ah, man, you can't take morals into consideration when it comes to DOM syntax! 🙂

    Jens,

    Yes, ad providers are definitely terrible.

    Binny,

    Yeah, it's like a "best-of"!

    Tommy,

    Nesting <code>html</code> tags, eh? Cool! 😉

    Stefan,

    Try the split next time. It's a new experience!

  • Dave Child says:

    I dug up some of my code from (circa) 1993 for your amusement:

    <code><html>

    <body bgcolor=000000 background=back.gif><font color=ffffff>

    <table width=100% border=0>

    <tr>

    <td width=30></td><td>

    <center>

    &nbsp

    <img src=temp.gif>

    <table border=0 width=85%>

    <tr>

    <td width=20%>

    <img src=spacer.gif width="50" height="1"></code>

    I'd like to point out this was my first site (still online, not updated in over 10 years, and no you can't have the address), and – worse – this particular piece of coding crumpet was just one page within a rather fetching frameset of similarly impressive pieces.

  • Robert Nyman says:

    Dave,

    Ah, thanks! 🙂

  • Stephen Hill says:

    I've just been cleaning up some code a wysiwyg editor made and fould this:

    <p />

  • Hans Nilsson says:

    One of my favourites is a list of links, wrapped in a table, with each individual link also wrapped in a table…

  • Robert Nyman says:

    Stephen,

    Wow, nice. Good understanding of web browsers…

    Hans,

    Yes, they were very common for a while! 🙂

  • Emil says:

    I recently heard that Microsoft.com was redesigned recently and using “web standards friendly CSS-layouts” (something of that nature was mentioned in the article that led me there), so I went to check it out.

    After a quick look at the source with the HTML-validator plug-in, apart from the horribly unreadable code format with practically no line breaks, there’s hundreds of empty spans, unclosed divs, empty font-elements etc, divs inside of h1-emelents, a description element (!?), massive amounts of inline style attributes, inline JS and really ugly url:s in all of the links. Oh, I almost forgot, tons of unescaped ampersands, of course.

    Many of these are perhaps not as bad as multiple HTML-elements, for instance, but a company of Microsofts size and resources should be able to produce something better than this, right? Right?

    As we (might) say in Sweden: “Huvvaligen”.

  • stephen says:

    I found this interesting bit of code on a local website after seeing scrollbars wrapping the left and base sides of an iframe around the scrolling-text:

    <code></MA</MARQUEE></m</marquee></code>

    Two unclosed elements, and two end-elements for a deprecated element that the W3C probably regrets ever creating, and one capitalised.

    I can only presume this was produced by the CMS. I'd hate to think a human wrote this. But under the circumstances, I can believe it…

  • I've been asked to work on a site a colleague built for a major client. The entire html document was built with document.write()

    Imagine that …. body tag was completely empty, and then HUNDREDS of javascript functions and global variables … and a lot of them with very similar names … the client had paid … a very hefty premium for that site … man, that was bloody awful.

  • Rowan Lewis says:

    Here is the worst code and attempt at design I've ever seen:

    http://pixelcarnage.net/Garbage/horror.html

    (WARNING: Sufferers of epilepsy may be harmed by viewing this page)

  • Robert Nyman says:

    stephen,

    Ah nice! Good ol' <code>marguee</code>!

    Emil,

    I just looked at the Microsoft web site, and that is truly terrible from a company of their size.

    Morgan,

    Ah, wow! I have to confess that I've once done something similar, but then at least it was through <code>appendChild</code> and other DOM methods.

    Rowan,

    Ha ha ha! That's outstanding! I liked the right-click prevention too! 🙂

  • Robert, we've all done something nasty in our past … but building the presentation layer a 10M+ DKK site with document.write for fun, is not one of the ones I've done… and hopefully not something you've done either 😛

  • Robert Nyman says:

    Morgan,

    Ah, no, it wasn't that bad. 🙂

    It was just a personal web site to test the concept. You know, custom JavaScript toolbars and all…

  • Mind.html — Tutorial Artificial Intelligence in JavaScript for MSIE by yours truly was long such execrable, terrible code that a fellow on Usenet nominated it as "software for people you hate" (ouch!). It's getting better. though. all the time.

  • Robert Nyman says:

    Arthur,

    Man, thanks for having the self-distance to share that! 🙂

  • Worst valid code I've ever seen: <a href="http://www.sandviken.se” target=”_blank”>www.sandviken.se.

  • Robert Nyman says:

    Roger,

    Late to the party, eh? 🙂

    That code wasn't nice, but it does actually validate as HTML 4 transitional.

  • Lars Gunther says:

    This is from the web app at my school, where we report students who are missing from class, etc:


    <html>
    <head>
    <title>
    ActiveReports Document
    </title><meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
    </head><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
    <style>
    @page{size: 8.5in 11in;margin-top:0.2in;margin-left:0.8in;margin-right:0.4in;margin-bottom:0.2in;}
    </style><div style="page-break-inside:avoid;">
    <div style="position:relative;width:7.3in;height:10.6in;">
    <span style="position:absolute;top:0.7638889in;left:0.06388891in;width:1.954615in;height:0.2061111in;font-family:Times New Roman;font-size:10pt;color:#000000;vertical-align:top;"><nobr>Nils Ericsonsgymnasiet</nobr></span>

    <span style="position:absolute;top:0.9838889in;left:0.06388891in;width:1.560914in;height:0.2461111in;font-family:Times New Roman;font-size:14pt;color:#000000;vertical-align:top;"><nobr>FP1AMA1201</nobr></span>
    <span style="position:absolute;top:1.467736in;left:0.001999974in;width:7.265717in;height:0.01in;overflow:hidden;background-color:Black;"></span>
    <span style="position:absolute;top:1.243889in;left:0.06388891in;width:0.2861111in;height:0.2061111in;font-family:Times New Roman;font-size:10pt;color:#000000;font-weight:bold;vertical-align:top;"><nobr>Nr</nobr></span>
    <span style="position:absolute;top:1.467736in;left:0.001999974in;width:7.265717in;height:0.01in;overflow:hidden;background-color:Black;"></span>
    <span style="position:absolute;top:1.243889in;left:0.4638888in;width:0.7735127in;height:0.2061111in;font-family:Times New Roman;font-size:10pt;color:#000000;font-weight:bold;vertical-align:top;"><nobr>Klass</nobr></span>
    <span style="position:absolute;top:1.467736in;left:0.001999974in;width:7.265717in;height:0.01in;overflow:hidden;background-color:Black;"></span>
    <span style="position:absolute;top:1.243889in;left:1.35129in;width:1.954615in;height:0.2061111in;font-family:Times New Roman;font-size:10pt;color:#000000;font-weight:bold;vertical-align:top;"><nobr>Namn</nobr></span>

    <span style="position:absolute;top:1.467736in;left:0.001999974in;width:7.265717in;height:0.01in;overflow:hidden;background-color:Black;"></span>
    <span style="position:absolute;top:1.243889in;left:3.419794in;width:3.135717in;height:0.2061111in;font-family:Times New Roman;font-size:10pt;color:#000000;font-weight:bold;vertical-align:top;"><nobr>Skrivrad</nobr></span>
    <span style="position:absolute;top:1.483625in;left:0.06388891in;width:0.2861111in;height:0.2061111in;font-family:Times New Roman;font-size:10pt;color:#000000;vertical-align:top;"><nobr>1</nobr></span>
    <span style="position:absolute;top:1.483625in;left:0.4638888in;width:0.7735127in;height:0.2061111in;font-family:Times New Roman;font-size:10pt;color:#000000;vertical-align:top;"><nobr>FP1A</nobr></span>
    <span style="position:absolute;top:1.483625in;left:1.35129in;width:1.954615in;height:0.2061111in;font-family:Times New Roman;font-size:10pt;color:#000000;vertical-align:top;"><nobr>Efternamn, Förnamn</nobr></span>
    <span style="position:absolute;top:1.483625in;left:3.419794in;width:3.135717in;height:0.2061111in;font-family:Times New Roman;font-size:10pt;color:#000000;vertical-align:top;"><nobr>____________________________________________</nobr></span>

    <span style="position:absolute;top:1.703625in;left:0.06388891in;width:0.2861111in;height:0.206111in;font-family:Times New Roman;font-size:10pt;color:#000000;vertical-align:top;"><nobr>2</nobr></span>
    <span style="position:absolute;top:1.703625in;left:0.4638888in;width:0.7735127in;height:0.206111in;font-family:Times New Roman;font-size:10pt;color:#000000;vertical-align:top;"><nobr>FP1A</nobr></span>
    <span style="position:absolute;top:1.703625in;left:1.35129in;width:1.954615in;height:0.206111in;font-family:Times New Roman;font-size:10pt;color:#000000;vertical-align:top;"><nobr>Förnamn, Efternamn</nobr></span>
    <span style="position:absolute;top:1.703625in;left:3.419794in;width:3.135717in;height:0.206111in;font-family:Times New Roman;font-size:10pt;color:#000000;vertical-align:top;"><nobr>____________________________________________</nobr></span>
    <span style="position:absolute;top:1.923625in;left:0.06388891in;width:0.2861111in;height:0.206111in;font-family:Times New Roman;font-size:10pt;color:#000000;vertical-align:top;"><nobr>3</nobr></span>
    <span style="position:absolute;top:1.923625in;left:0.4638888in;width:0.7735127in;height:0.206111in;font-family:Times New Roman;font-size:10pt;color:#000000;vertical-align:top;"><nobr>FP1A</nobr></span>

    <!-- etc -->
    <span style="position:absolute;top:10.41389in;left:7.093889in;width:0.1738276in;height:0.1861105in;font-family:Tahoma;font-size:8pt;color:#000000;vertical-align:top;"><nobr>1</nobr></span>
    <span style="position:absolute;top:10.41389in;left:0.0138889in;width:1.986111in;height:0.1861105in;font-family:Tahoma;font-size:8pt;color:#000000;vertical-align:top;"><nobr>den 11 februari 2007</nobr></span>

    </div>
    </div>
    </body>
    </html>

  • […] #8217;ve had this post sitting in the queue for awhile but Robert Nyman’s  Worst Code Ever topic (also covered at […]

  • Olly Hodgson says:

    I have a good one (I blogged about it a while back). I had to style a tree-control. Easy enough you might think…

    Oh no. Not a chance.

    It has endless nested tables, pointless empty td elements, spacer gifs, endless inline styling and obtrusive scripting (with no fallback), unusable id attributes (thanks .net!) and only one class attribute – on the outermost table.

    Exhibit A should give you an idea of the sort of pain I’m facing here…

  • […] Advocate » The Worst Code You’ve Ever Written Robert Nyman asked his readers to submit examples of awful code, and they […]

  • Bramus! says:

    Today at work I checked out a site we're about to remake as it's outdated in content and markup. Immediately hit CTRL+U (view-source) and noticed that the site was wrapped in htmll tags (double L!). To say that someone else created that site only last year!

  • Travis says:

    Check out the source of Walmart's new online video rental: http://mediadownloads.walmart.com

    Some funny examples…

    1) first and foremost:

    <td><img src="../image/spacer.gif"

    2) then on every A tag, have style and events:

    3) links?

    <b style="cursor:pointer;color:white" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'" onclick="return quickChk();"> Cart

    4) Client-side TODOs:

    <!– TODO hide checkout/recalculate buttons when the shopping cart is empty –>

    5) DB Table names in html:

    <!– Loop through ShippingGroups, then through CommerceItemRelationships to

    display each Commerce Item. Place in form. –>

    6) seemingly endless DIV and TABLE nesting:

    < div class="popup_holder" id="sysValidationForInstall">

    < div class="roBox_top"></div>

    < div class="roBox_center">

    <table width="92%">

    <tr valign="top">

    <td width="80%">< div class="roTitle">System Validation</div></td>

    7) lots of empty containers (or filled with BR):

    <td class="email_popup_border" width="1"><img src="../image/spacer.gif" width="1" height="1" alt=""></td>

    <td colspan="2" width="100%" align="center" valign="middle">

    < div id="emsg" style="text-align:justify;padding-left:12px;padding-right:12px;padding-top:12px;">

    </div>

    </td>

    8) ginormous z-indexes:

    style="z-index:20000010000"

    9) a DOCTYPE out of the blue:

    <table width="92%">

    <tr valign="top">

    <td>

    < div id='popbody' class="roText">

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;

    10) 296 validation errors:
    http://validator.w3.org/check?verbose=1&uri=h

    11) at least they care about the visually impaired:

    <img src="../image/spacer_footer.gif" width="1" height="1" border="0" alt="The Walmart.com site includes Flash technology. To avoid interruption of software designed to aid visually-impaired people, please turn off your Flash player.">

    They put that on line #8380 in their HTML source.

    I'm sure there is much more too, but that ought to be enough to make most web devs cringe and/or throw up.

  • […] than GOTO? February 14th, 2007 2:37:55 pm pst by sterling Robert Nyman solicits the worst code you’ve ever seen (thanks, [GAS]). Most of the exa […]

  • PortlandHead says:

    We're going to be redesigning this site for the Client, a tourism-oriented Chamber of Commerce in Maine. Here's what we found when we looked under the hood of their current site:

    – No doctype

    – scripts placed outside the html tag

    – tags that were capitalized followed by lowercase tags

    – *sigh* font tags

    As one of our designers said: "Icky". Here's an excerpt:

    Southern Midcoast Maine Chamber Of Commerce, Sequin Lighthouse Maine, Heritage Days Maine – MidCoastMaine.com

    <a>

  • PortlandHead says:

    That's not the excerpt I had in mind. Oh well, read it yourself:

    http://www.midcoastmaine.com/index.asp

  • […] ine El peor código HTML [Vía 456BereaStreet] Hace unas semanas Robert Nyman proponía en […]

  • Mike Cherim says:

    Haha, I love it. I offer you this piece of feces I produced myself a few years ago. It's not the worst I've ever seen, but it's pretty bad. It's a site laid out with tables and nearly all of the content is put to the page with JavaScript. I keep it in my portfolio as a reminder of what not to do 🙂

  • Crille says:

    How about this one?

    <table cellpadding="0" cellspacing="0">

    <form name="somename" action="someurl" method="post">

    <tr>

    <td>Cellcontent</td>

    </tr>

    </form>

    </table>

  • Andrew K. says:

    There's some bad code in here, but I've got one that would open you up to a possible court case:

    xmlhttp.open('GET', '/FormValidation/IsPinValid.aspx?pin=' + pin&rnd=date.getTime(), false);

    It wasn't in production, thank goodness, but that's one I found yesterday…and yes, 'pin' is Personal Identification Number, as in your debit card access code.

    Derrrr. Smarts.

  • Robert Nyman says:

    Wow, thanks for sharing, everyone! 🙂

  • m a r t i n says:

    This is what I did back in 1998:

    <font color="White">
    <script language="JavaScript">
    <!--
    if (coolBrowser) {
    document.write('<td align="right" valign="top">')
    document.write('<A HREF="javascript:openit();"><img src="img/snurra_august.gif" name="bilden" border="0" width="127" height="85"></A></td>')
    }
    else{
    document.write('<td align="right" valign="top">')
    document.write('<A HREF="/august/index.shtml"><img src="img/snurra_august.gif" name="bilden" border="0" width="127" height="85"></A></td>')
    }
    //-->
    </script>
    </font> <noscript>
    <td align="right" valign="top" width="127"> <a href="/august/index.shtml"><img src="img/snurra_august.gif" name="bilden" border=0 width=127 height=85 alt=""></a></td>
    </noscript> <!--slut p� snurran--> </tr>

    I like 😉

  • I have to go all the way back to May 2004 to find the ultimate tag soup on my old employer's site – at least I can blame Dreamweaver for producing it…

  • Matt Heerema says:

    I'll second myspace.com, but this also has to be close:

    http://kc-church.com/. Not trying to rag on the church, or the volunteer who built it out of the kindness of their heart, just the code…

  • Robert Nyman says:

    Matthew, m a r t i n, Duncan, Matt,

    Wow, really outstanding! Thanks!

  • Erwin Heiser says:

    About Walmart, it gets even better: if you go that page I get a "Our website requires the browser Internet Explorer version 6 (or higher) or Mozilla/Firefox with an IE Tab Extension (IE installation required). It appears that you are using Firefox, Safari, or another browser that Wal-Mart Video Downloads doesn't currently support. Click here to get Internet Explorer for free from Microsoft."

    Click here to get IE for free from Microsoft. Oh, man!

  • Robert Nyman says:

    Erwin,

    Oh man. Oh man. Really in the spirit of the web…

  • Dennis says:

    This is no Spam. Just a devoted reader of: http://thedailywtf.com/

    A daily display of the shittiest codes on earth. Sometimes also HTML. You won't find better stories than these 😉

  • Pat says:

    This was posted on a forum I frequent recently…very, very bad. Generated by Microsoft Word it looks like. We had someone at work do something similar.

    greggsband.co.uk

    You have to look at it in IE to see what it's supposed to look like. It's like a bad trip in good browsers.

  • Nate Klaiber says:

    I know I am a little late, but I saw this today:

    <code>

    </code>

  • Nate Klaiber says:

    Any my code didnt post…..ha.

  • Nate Klaiber says:

    I have a good example, but wasn't able to post my code. Basically, you can see at http://renaissance-salon.com what I am referring to.

    GoLive tags, JS library linked from hard drive, redirect therefore doesn't work. Not only that, but it requires a huge library to do a simple redirect.

  • Robert Nyman says:

    Dennis,

    Yes, it's a good source.

    Pat,

    Wow.

    Nate,

    You need to escape the code properly: &lt; for <, &gt; for >, and so on.

  • […] click molt gracios Mau Mau una proposta a tenir en compte Sobre la premsa 2.0 Dijous 15 Buscant el pitjor codi HTML via:456 Berea Street Barcamp a Londres via:Soledad […]

  • Rob Mason says:

    Speaking of invalid code, found this website today: UK Web Design Association.

    Their site seems to validate fine (even though it's a table driven monstrosity), but when you do a search for a designer in the local area (mine being Gloucestershire) I've yet to find one who's site has semantic mark-up, with nice CSS that actually validates correctly…most of them are hulking masses of invalid code built around tables.

    …doesn't give the industry a good name…

  • Marty says:

    Does this count?

    We created a template page that is semantically correct, validates, has functioning JavaScript functionality and has all the proper usability/accessibility keys put into it, and sent it to the offshore team. All they had to do was replicate the pages for each section and put in the proper calls to the database at particular (commented) points on each page, i.e. the code version of "Insert Tab A into Slot B".

    When we got back the pages, they obviously didn't understand how/why we did the template in the manner we did it, so they converted the whole thing into a table form and removed all of the code they didn't understand and inserted style tags into the markup. Even worse, it didn't even work.

    Our lead programmer almost bought a plane ticket to personally go overseas and throttle them… Sorry I can't speak to the site, but it was … aggravating to see happen, to say the least.

  • Paul Groves says:

    Where some might use a css border, today I chanced across. . .

    <p class="smaller" style="margin-top: 0;">_______________________________

  • Anonymous says:

    (I repost my comment from 456 Berea Street ^_^)

    Check http://www.davidcarsondesign.com/ ^_^

    All JavaScript and CSS in the header, but more importantly, they have repeated 37 times “font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;” ^_^; (among a number of other properties).

    … But best of all, they still use table design, they still use many ugly presentational markup… and the result is hideous, very basic, and could be done, the same, with only a few lines of markup and CSS ^_^; (and it could be done far better, without much more code…).

    An example of ugly code from the page:


    <p class="bx0"><span class="s"><i>
    [some content, with multiple <br>]
    </i></span></p>

    (this kind of things is repeated all over, with paragraphs and blockquotes…)

    I guess it was done by some WYSIWYG editor… maybe reusing an older version of the page, built with an editor which did not support CSS… (or the WYSIWYG editor is simply mixing CSS and presentational markup, because it is not advanced enough…).

  • Jeff Dickey says:

    Here's a good one, guys. Check out this job site, which has boards in several countries but is run with an iron fist (Web-wise) from Hong Kong.

    Not only does the site have invalid code and horrid JavaScript, it actively locks out (with repeated warning) any atempt to access the site with an "unsupported" browser, and "helpfully" provides a link to download Internet Exploder. Of course, that does us *nix (or Mac) folk scant good…

    The "developer" in their Malaysian office knows about the problems, but his hands are tied.

  • Brandon says:

    YOU ALL HAVE NOTHING ON THIS –

    check out this clusterf #@$! –
    http://www.LCCOACHING.com

    notice and admire the brilliant abuse and misuse of redundant logic, efficient "semantic" code, accessibility, usability, and absolute misapplication of …..well I think everything….

    – if WE ALL tried to come up with something worse semantically in a paid contest, & had a wiki with worldwide participation sponsored by the W3.org and ADA …we would not be able to compete.

    the brainchild behind this is obstinate and ignorant yet the site is about teaching languages …how ironic.

    my friend has to work for this guy…..let me know if i missed something worse than this……one page should top the list, but for grins try to read through and understand how someone can misunderstand something in such a miserable way….

    run that badboy lccoaching.com through a validator or accessibility/508 screen and see if it freezes up w3's server again…

    i will be glad to provide his email, but any of the ones on the site go to him and he LOVES feedback…..seriously…

  • Robert Nyman says:

    Thanks for the suggestions, guys!

  • This totally blows (my mind), it really does.

    http://www.safflebussen.se/

  • Sorry for the double comment… Consider the above-linked dailywtf thing here:
    http://thedailywtf.com/Articles/Hyperlink_2_0x2e_0.aspx

    Now look at this:
    http://www.imvu.com/shop/web_browse.php?cat=106-40-128

    Not so bad? Try browsing their catalog. Yes, I don’t know… wtf………

  • http://www.google.co.nz/search?num=100&q=site

    Pay special attention to the regions between "user html start" and "user html end". These are average internet user/designers. Sign up and try asking them about xhtml and see how many of them know what it is. How many of them can tell you what css or activex is?

    No, we don't need to educate them. The world is just a bad place. I was one of these people once, and I've written far worse code than all of them.

Leave a Reply

Your email address will not be published. Required fields are marked *