Forgot your password?
typodupeerror
Slashdot.org News

Slashdot HTML 4.01 and CSS 748

Posted by CmdrTaco
from the welcome-to-2002 dept.
After 8 years of my nasty, crufty, hodge podged together HTML, last night we finally switched over to clean HTML 4.01 with a full complement of CSS. While there are a handful of bugs and some lesser used functionality isn't quite done yet, the transition has gone very smoothly. You can use our sourceforge project page to submit bugs and we'd really appreciate the feedback. Thanks to Tim Vroom for putting the HTML in place, Wes Moran for writing the HTML in the first place, and Pudge for writing the code to convert 900k users, 60k stories, and 13 million comments to comply. And for the brave, download the stylesheet and start experimenting with new themes and designs for Slashdot: some sort of official contest to re-design Slashdot is coming soon, so you can get a head start now.

Response to some reader notes in the forum:

  • There are a handful of validation errors. Some will be fixed in the next day or so. Others are external HTML that is out of our hands. We may never toally validate with zero errors. yes we're comfortable with that.
  • We're not going to XHTML for the same reasons as above- we control almost all of our HTML, but some of it (like the ads, and imports from other sites) just isn't ours to muck about with. We could go to XHTML, and someday we might, but today we're happy to just get to HTML 4.01 and CSS.
  • Light Mode will be back in some form or another. The problem is that light mode served two purposes: Low Bandwidth, and Simplified Design. The later will probably be handled with a CSS theme (we have a handheld theme already). Low Bandwidth is a little trickier, but we will resolve that soon.
  • All of our code is beta tested on www.slashcode.com and use.perl.org. Unfortunately there's always a few issues from those tiny tiny sites and the giant bohemoth that is Slashdot itself.
This discussion has been archived. No new comments can be posted.

Slashdot HTML 4.01 and CSS

Comments Filter:
  • HTML 4.01?! (Score:3, Insightful)

    by Anonymous Coward on Thursday September 22, 2005 @10:20AM (#13621205)
    Why not XHTML?
  • stylin' (Score:3, Insightful)

    by maharg (182366) on Thursday September 22, 2005 @10:22AM (#13621217) Homepage Journal
    nice one guys !
  • by OS24Ever (245667) * <trekkie@nomorestars.com> on Thursday September 22, 2005 @10:25AM (#13621267) Homepage Journal
    At first glance, it doesn't look any different to me, so you must have done something right.

    Except then I hit reply and the post a comment dialog looks a bit different but not bad.

    Must have been quite the effort, congrats.
  • close... so close (Score:4, Insightful)

    by Thng (457255) on Thursday September 22, 2005 @10:25AM (#13621271)
    http://validator.w3.org/check?uri=www.slashdot.org [w3.org]

    summary: "This page is not Valid HTML 4.01 Strict!"

    Sure, only 13 on the front page of /. (don't remember how much before) and they all seem relatively minor. Still, sure is better than what it was. Glad to see it. thng

  • Re:Testing process (Score:3, Insightful)

    by garcia (6573) on Thursday September 22, 2005 @10:30AM (#13621342) Homepage
    Why don't you guys have a formal testing process in place for slashcode?

    I'd prefer that they worry less about standards compliant code, testing, and other bullshit and instead work on eliminating worthless editorials, duplicate stories, and any number of other far more important issues to make Slashdot better.

    It's nice to see that they are working on *something* but it *was* working all those years just fine. It's just been the last two years that Slashdot has gone *really* downhill with stuff that has nothing (or little) to do w/the codebase.
  • Re:So that is why (Score:5, Insightful)

    by a.ameri (665846) on Thursday September 22, 2005 @10:41AM (#13621471)
    NS 4 nearly has no support for CSS. That's why the "new slashdot" (heh, never thought I would see that phrase) looks crap in it.

    Seriously, don't you think it's time to drop support for NS 4? I mean this is the slashdot crowd, that has been saying for the last 8 years that developers should comply with standards and don't tune web pages for a specific browser, and now that finaly it is compliant with the standard, you are complaining that it looks bad in an ancient browser? You know, slashdot now also looks completely crap on BeOS's netpositive. should I complain about that as well?
  • Re:Yawn! (Score:4, Insightful)

    by Bedouin X (254404) on Thursday September 22, 2005 @10:49AM (#13621541) Homepage
    If you've ever done serious web design then you know that going from a 5 year old plus table-based layout to a completely CSS-driven one is more like a Godzilla step.

    More importantly, it makes things like what you are requesting relative bably steps.
  • by elmegil (12001) * on Thursday September 22, 2005 @10:50AM (#13621547) Homepage Journal
    Because of course if you're reading slashdot you must be a leet dHTML haxxor.
  • by SillyNickName4me (760022) <dotslash@bartsplace.net> on Thursday September 22, 2005 @10:54AM (#13621586) Homepage
    The later will probably be handled with a CSS theme (we have a handheld theme already). Low Bandwidth is a little trickier, but we will resolve that soon.

    Light mode worked very well for both. Keep in mind that a majority of handheld based browsers and things like Lynx/links dont have much use for css if they support it at all. Not to mention that for handheld devices low bandwidth is almost alwas a requirement as well, considering that many people who use one for accessing the internet do so on one of the cellphone networks, and are likely to pay per byte. The 2 things are indeed different requirements, but they more often then not happen to come together so why not serve both with the same solution?
  • by mcc (14761) <amcclure@purdue.edu> on Thursday September 22, 2005 @11:04AM (#13621652) Homepage
    In safari and it seems firefox for macintosh weirdness abounds throughout the new slashdot layout. Things show up in sans-serif fonts at random, for example the contents of the "recent posts" box on user pages, or the "allowed html" beneath a post. Things have unexplained margins or indents; for example the "Subject" box when you submit seems to be over one space from the comment box. When showing comments, all the gray boxes have surprisingly large internal margins but everything else has no margins at all, all the comments are scrunched together. Font sizes seem to vary sometimes at random, for example the first three headlines on the front page are a totally different size from the ones beneath. The whole thing looks a bit hodgepodge.

    Of course, web design is unpredictable and I'm sure it'll get sorted out eventually.
  • Re:Not true (Score:3, Insightful)

    by Bogtha (906264) on Thursday September 22, 2005 @11:13AM (#13621712)

    I think your statement that it "does work" needed clarifying.

    I see it the other way around. I loaded it up, read articles, clicked the links, changed the filtering, etc, and it all worked just fine.

    I think Misagon should have been more clear that he didn't like the way it looked instead of saying that it was broken, because it's clearly not broken. The plain HTML style for Netscape 4.x is very common these days, any Netscape 4 user should be used to it by now.

  • Re:HTML 4.01?! (Score:3, Insightful)

    by GreyWolf3000 (468618) on Thursday September 22, 2005 @11:23AM (#13621788) Journal
    That's the joke: you're supposed to read it and say "Oh, he meant to write the binary equivalent of decimal 2, but he's one of the people who can't."
  • Tags (Score:3, Insightful)

    by slummy (887268) <shawnuthNO@SPAMgmail.com> on Thursday September 22, 2005 @11:28AM (#13621821) Homepage
    There's one thing you easily conform to standards with, end your img and br tags properly.

    Example 1: <img src="img.png" />
    Example 2: <br />

  • Re:HTML 4.01?! (Score:3, Insightful)

    by Bogtha (906264) on Thursday September 22, 2005 @11:31AM (#13621852)

    Maybe you have been living under a rock, but nearly all browsers accept application/xml+xhtml, so there is nothing against XHTML now.

    "Nearly all browsers" is a very disingenuous way of saying "the majority of people are using a browser that doesn't accept application/xhtml+xml".

    you can use PHP to serve text/html to IE while remaining standards-compliant with those browsers that, well, actually care about standards-compliance.

    In order to serve XHTML 1.0 documents as text/html you have to use Vary: Accept, which reduces your cache hits, slowing down your site, and driving up bandwidth use and server load.

    You also have to actually write a page that would work if it was served as application/xhtml+xml - something that would require their third-party advertisers to rewrite their Javascript for.

    Furthermore, you also have to comply with Appendix C of the XHTML 1.0 specification, which, among other things, restricts you to UTF-8 or UTF-16, which will cause you severe compatibility headaches if you need to use many non-Latin-based languages.

    I would recommend XHTML over any flavour of HTML simply because XHTML forces the developer to restrict his markup to semantically meaningful elements

    Nonsense. You can use <font>, layout tables, etc in XHTML just as you can in HTML.

  • Re:HTML 4.01?! (Score:3, Insightful)

    by smallguy78 (775828) on Thursday September 22, 2005 @11:36AM (#13621885) Homepage
    what baffles me about xhtml is that browser engines handle HTML in a fast and effective way, so the desire to switch to xhtml for standard's sake seems pointless - the markup language was created for the parsing engine.

    The parsing engines are now all mature and so having to squeeze layout, scripting etc. into an XML format that doesn't necessarily lend itself to this makes no sense to me. Yes have well formed HTML, but making it XML compliant, why bother?
  • Re:HTML 4.01?! (Score:5, Insightful)

    by Lewisham (239493) on Thursday September 22, 2005 @11:46AM (#13621970)
    This is a lot like the argument for why bothering to comment, or why bothering to make code easy to understand, or why bother to code a web page in a half-arsed way as long as IE renders it OK.

    Because its the Right Thing To Do.

    Sure, it works fine as is. That's great. But if you can code in XHTML, why not? There are no good reasons not to apart from the fact you are lazy (I don't buy any of the arguments from that .ch site). Good HTML will look almost exactly like XHTML, why not make that extra step?

    XHTML enforces nice, clean code. None of the HTML fanboys can argue that. It can be parsed nicely in an XML parser, making it portable into all sorts of applications, from automagic web spiders making massive search engines, to little Java programs. HTML makes parsing more complicated, and the error handling an even bigger pain. Getting everyone to XHTML, especially technology flagwavers like /. should be easy.

    No, you don't have to do XHTML. But you should.
  • Re:Wrong date?! (Score:2, Insightful)

    by LiquidCoooled (634315) on Thursday September 22, 2005 @11:51AM (#13622027) Homepage Journal
    "Edit Comment"

    Surely thats a bug. We can't edit comments posted.
    We can post them, or create them, but we can never edit them.

    Also, the order of the buttons has changed, is that to get us double checking.

    I noticed the changes to the user page and thought FF had dropped my config profile (min font size) thankfully it hasn't.
  • by mikiN (75494) on Thursday September 22, 2005 @11:59AM (#13622084)
    ...webpage bandwidth is pretty irrelevant in 2005.

    Please speak for yourself, d.de. Or are you going to refer 'us' to the 'US centric' section of the Slashdot FAQ?

    There are literally millions of people using the 'net over slow dialups, multiparty daisy-chained wireless links, PDA/phones not using GPRS, etc.
  • Re:HTML 4.01?! (Score:4, Insightful)

    by pudge (3605) * <slashdot@NOspam.pudge.net> on Thursday September 22, 2005 @12:14PM (#13622206) Homepage Journal
    In what way is writing xhtml harder than writing html 4.01?

    If HTML is not perfect, it will still display just fine. If XHTML is not perfect, nothing will be displayed, except your XML errors.

    Unless, of course, your XHTML is being rendered as HTML, not XML, in which case why are you doing XHTML at all?
  • Re:Ideally (Score:3, Insightful)

    by McDutchie (151611) on Thursday September 22, 2005 @12:22PM (#13622280) Homepage
    In an ideal world, stuff like slashdot would fail gracefully.

    But it does fail gracefully. Other than looking like crap, Slashdot is perfectly usable in Netscape 4.

  • Re:Easy solution! (Score:1, Insightful)

    by Anonymous Coward on Thursday September 22, 2005 @01:13PM (#13622754)
    These validators always bugged the hell outta me.

    No "border" attribute for the IMG tag? No "align" attribute for the P or DIV tag? No "language" attribute for the SCRIPT tag? In that case, I've been writing VERY bad html for a LONG time.

    <flamebait>When I see errors like this, I wonder what friggin' use these validators are... if you call these things errors, then why do all browsers (even mozilla/ff) honor these attributes instead of ignoring them? What purpose does it serve to flag these as "errors" other than to be pedantic in some way, shape or form?</flamebait>

    Okay, I'm flying a bit off the handle, but can someone explain how/where/why these attribs were developed, why they continue to be supported? Or are their use intended for a different DOCTYPE, or something like that? (DOCTYPE declarations -- yet another thing whose purpose I never fully grasped)
  • by Bitsy Boffin (110334) on Thursday September 22, 2005 @01:54PM (#13623103) Homepage
    Err, except the way it is now is semantically correct - it's a list of links. Your way it's just a bunch of links all mooshed togethor with no semantics at all.

    There is a lot of "div-itis" though, but I'm guessing that was to provide flexability for user defined stylesheets in the future, so can be forgiven i guess.
  • Re:Not true (Score:3, Insightful)

    by elemental23 (322479) on Thursday September 22, 2005 @02:28PM (#13623373) Homepage Journal
    I'm guessing you're probably used to sites looking like shit then, right?

    Seriously, why?
  • Re:Wrong date?! (Score:4, Insightful)

    by BandwidthHog (257320) <inactive.slashdo ... icallyenough.com> on Thursday September 22, 2005 @04:44PM (#13624623) Homepage Journal
    Also, the order of the buttons has changed

    Oh good, it's not just me.

    is that to get us double checking

    If they wanted to do that, you'd think they'd simply not show a Submit button until after the first Preview.
  • Re:HTML 4.01?! (Score:3, Insightful)

    by syousef (465911) on Thursday September 22, 2005 @08:54PM (#13626287) Journal

    * Scripts that use document.write() will not work in XHTML contexts.
    Good!
    document.write() should have been put out to die years ago.


    Yes, lets break things! Let's break things everywhere!!!

    FTP isn't secure. Kill it! Force everyone to use SFTP right now!
    HTTP isn't secure. Oh no! Kill it! Force everyone to use HTTPS right now!
    Someone wrote a complient web page two whole years ago and they expect it to work now???!!! Quick! Kill him!!!

  • by Rewd (18053) on Thursday September 22, 2005 @11:24PM (#13626850) Homepage Journal
    Please, please, please display years on your dates ... I can't believe this hasn't been fixed yet.

The study of non-linear physics is like the study of non-elephant biology.

Working...