Treehouse: Grow your CSS skills. Land your dream job.

Making up tags – WHY is it wrong?

  • # September 5, 2011 at 10:16 pm

    Please give me good reasons why this is forbidden — other than IE the party pooper, and other than “they might invent a tag with that identifier one day”:

    And no, I’m not trolling, I’m seriously asking. Feel free to flame me, I probably deserve it for being a reckless fool, but it’s a honest question :)

    # September 5, 2011 at 10:27 pm

    Well… It won’t validate, but I’ve done it before too… I’m not sure if this is no-no or not.

    # September 5, 2011 at 10:37 pm

    Of course I would never use it for stuff I do for other people. that’s a given. but when it comes to myself, well, I’d be the one taking the risk… and I just earlier had to think about how not long ago, everybody (including me) “properly closed” their br tags, just to validate – and for what? To now forget that ever happened. Heh.

    Not saying this also applies here, but still, just doing what’s right for the sake of some vague notion of doing what’s right is not enough to stop me from at least seriously considering the potential uses of this… (I’m thinking mostly CSS/HTML complexity/size, but also fun and rock’n’roll, plus a way to give IE the finger :D)

    [edit: And at the very least, kind of owe it to myself to make a website with no classes, no ID’s, just tags! And make it real pretty too, so that people actually want to look at how it’s made, bwahaha. Hmm I’m sorry, It’s late/early here, I need to go to bed :P]

    # September 5, 2011 at 11:43 pm

    To be honest, I had no idea that this was even possible – it’s a very cool idea. I’m sure there are accessibility issues there (screen readers and what not), though I could not cite them for you.

    # September 5, 2011 at 11:55 pm

    It doesn’t work at all in IE 8 or below. But that makes sense, otherwise you wouldn’t need the HTML5 shim in IE 8 and friends.

    # September 5, 2011 at 11:56 pm

    Yes, of course if you make up your own tags for just about everything, that would suck (as tempting as it would be to use “bq” instead of “blockquote”, seeing how there is “q”…) I pay too little attention to accessibility anyway (who doesn’t :/ ), but I don’t want to make it worse for no good reason.

    But what about d instead of div? and s instead of span? those have no semantical meaning anyway, right? so why use 13 or 11 characters where you could use 7… times a billion! It’s mostly because I’m playing around with making my own CMS, so these things “pay off (a little) in bulk”, and it’s at least thinkable to change back again without dying inside. Otherwise I wouldn’t bother, but I love shaving bytes off here and there :D

    # September 5, 2011 at 11:59 pm

    my god, do you want to set us back 20 years? Do you work for Microsoft?
    There are specifications for a reason – abide by them. There exists a language for what you want to do – XML

    Regarding you’re closing of elements: it was thought that the future of html resided in xml and so xhtml was born. It, as you know, required stricter syntax (which I think was a good thing). So you choose to use xhtml, while you could have stayed with html 4.01, but xhtml is dead now and won’t be resuscitated. html5 is backwards compatible, so if you used self closing elements you can continue to do so, or if you wish, not do so.

    But please, code with standards in mind. We (as a collective group of developers) have finally reached a point where the playing field is near level and not full of radioactive crud all for the sake of browser dominance. The future finally looks bright and you want to start making things up…

    # September 6, 2011 at 12:07 am

    @joshuanhibbert well, then it should also be possible to extend such shims for custom elements :D

    Although I’m *really* liking the idea of just saying bye to IE-(specific stuff) for good (for my own stuff, naturally), because it saves soooo much hackish BS which ruins the whole quest for elegance. So currently my plan is to make it look bearable in IE, no further effort/hacks, and completely ignore it javascript-wise when it comes to admin stuff, admins need to use real browsers.

    # September 6, 2011 at 12:20 am

    “But please, code with standards in mind.”

    And that means? I make websites, not browsers, I don’t invent tags for others to use, either. So — lol? I’m not setting standards for anybody, I make my own website.. Microsoft, heh. If my website breaks, because “d” and “s” suddenly get a meaning (very likely, yes?), that’s my loss. And yes, I knew about XML, but my point is, it never mattered. It mattered for strict validation, not ever for rendering. Well, in some cases, but people simply blindly did it. So if “abide by the standard” is just another wording for “they might invent a tag with that name some day”, then read the first post. I’d take that risk :P

    # September 6, 2011 at 12:21 am

    @Johann you just need to create the DOM element using JavaScript. Not sure why you would though, as @wolfcry911 said.

    # September 6, 2011 at 12:39 am

    “Not sure why you would though, as @wolfcry911 said.”

    Because d_l is shorter than div style=”float:left;” (or even div class=”fleft” as I have it now *),

    # September 6, 2011 at 3:19 am

    if you want, invent your own language why not
    but don’t screw the one that works ;]

    # September 6, 2011 at 3:29 am

    In terms of accessibility this would be horrific

    # September 6, 2011 at 3:52 am

    I think some of you are being a bit rude to the guy.

    He was just asking, being curious.

    It might be wrong, but seriously, play it cool. He actually makes a fair point, in a sense. My argument would be, where would you draw the line?

    You do need some “structure” and “standards”. Helps people learn more than anything. Also accessibility is a big issue here.

    # September 6, 2011 at 4:05 am

    Good call @Brightonmike, no need for the unfriendliness at all!

Viewing 15 posts - 1 through 15 (of 52 total)

The topic ‘Making up tags – WHY is it wrong?’ is closed to new replies.