Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Making up tags – WHY is it wrong?

  • This topic is empty.
Viewing 15 posts - 16 through 30 (of 42 total)
  • Author
    Posts
  • #86544
    chrisburton
    Participant

    ….and that ends our chapter today folks. (slight humor @mottie).
    But I would have to agree with that being said.

    #86551
    Johann
    Member

    “how MS thought they could do whatever they wanted and not follow the specs (that they even took part in creating), like you’re implying here”

    This is not at all the same though. Microsoft, by what they did or didn’t do, effectively set the standards for others. Microsoft thought they could do what they want to others, I think I can do what I want to my own website. The assumption that others might follow my “example” is just that, an assumption. Just like I would assume unknown tags to be handled as they are handled now. I’d say that’s a wash at most.

    You’ve picked the only two non-semantic elements in html. They exist for structure only and have come to be because developers and spec writers saw the need for structure within html. Pick a different element, say ‘input’ to ‘in’ or ‘legend’ to ‘l’ etc.

    That makes no sense. I can’t redefine those tags, can I? I can just create “new empty ones”, like div and span, that are void of meaning. I “picked” those two because they are the only two that behave in the same way… and you’re saying they are the ones I shouldn’t pick for comparison? Well nope.

    Well first, I advocate all the time to never use empty elements. There are a half dozen ways to clear or contain a float – there’s simply no reason to use the empty div (or clr).

    You have several floating elements. Some or none might be printed, so you wouldn’t know which one to put the clearfix on without complicating rather simple code just for that. So either you make a class for a float-group and apply the clearfix to the :last-child, OR you put the empty clearing tag there. If there are other ways, I simply haven’t come across them yet.

    Now you’re going even a step further and introducing styling tags into the markup language. Something we’ve eradicated over the years and for good reason.

    Well, you say that, I totally disagree. Classes for styling purposes on container div’s and styling tags are essentially the same. Of course you need to still style them — but instead of styling something with a class, you style a tag. And by the way, with long names that takes up more space than using a class…

    “I don’t see how creating a stylesheet in any way resembles creating a new (markup) language.”

    And I don’t see how that is creating a new markup language. I ask, again, what semantically different between [div class=”something”] and [something]? In both cases, the meaning is in the CSS. http://en.wikipedia.org/wiki/Span_and_div

    “However, as span and div have no innate semantic meaning besides the logical grouping of the content, they can be used to specify non-standard presentation or behaviour without superfluous semantic meaning.”

    You say “new tags” create new semantic meaning, but I disagree. They too simply group content, and just like it’s enough for the webite to know the meaning of classes, the same would apply to made up tags.

    I still haven’t been able to think of one good use for making up tags, by the way. Most stuff has classes anyway, and my class names are economic enough, so mixing classes is shorter as well as more readable than nesting tags :P

    This is from the HTML 2.0 specs, I have no clue how this applies today, but it’s the best I could find so far:

    4.2.1. Undeclared Markup Error Handling

    To facilitate experimentation and interoperability between
    implementations of various versions of HTML, the installed base of
    HTML user agents supports a superset of the HTML 2.0 language by
    reducing it to HTML 2.0: markup in the form of a start-tag or end-
    tag, whose generic identifier is not declared is mapped to nothing
    during tokenization. Undeclared attributes are treated similarly. The
    entire attribute specification of an unknown attribute (i.e., the
    unknown attribute and its value, if any) should be ignored.

    In other words, you cannot ever depend on browsers styling unknowing tags, you could even say IE is doing it right, which is offensive but true :P

    “You also mention that you won’t minify either, but isnt that the whole reason you want to create new elements in the first place? To save a few bytes?”

    Well, actually I do compress stuff where I can, and I wouldn’t even mind minifying serverside, though I’d provide cookie preferences to get it unminified. But sure, of course it was silly to “brag” about not minifying (which is effectively obfuscation — all the descriptive variable names, *poof*!), and I don’t even mean to diss jquery, I’d use it without hesitation on a big project – but still, I can’t “create new elements” other than making a browser a lot of people use, or being a part of the w3c efforts etc. Your comparison with semantic elements does not apply. Everybody is making “new (functional) elements” by combining classes and id’s and javascript, anyway, just like we use tags without meaning to give them meaning via stylesheets.

    I brought up jquery because many people are happily jumping into black boxes just to get the same shiny effects others have. In the case of jquery that’s fine, because you at least still can get it unminified, but the point is, in practice that ain’t happening. They’re just making it easier, yes, kinda like I’d be making it easier for myself, and harder for nobody else — so how is that “being Microsoft”? How is it “creating new elements” and “destroying what everybody worked so hard for”? I can totally see how it’s a waste of time to talk about it, much less do it, but come on, get some perspective..

    What I would be doing is use what browser are allowing for, style unknown elements, which is in violation of the specs — and it would work fine in those browsers as long as they do that, and as long nothing else changes. There is no semantic difference between [div class=”some_class_you_need_the_stylesheet_to_understand_the_meaning_of”] and [some_tag_you_need_the_stylesheet_to_understand_the_meaning_of]. But it was silly bring it up I guess. I was asking for good reasons not to do it, so far I got strawmen mostly, and the only real reasons I can see is IE and that browsers might change error handling in the future. I think I can deal with both, should I ever find a good reason to use it. Thanks for the input and sorry for asking.

    #86552

    @Johann Don’t be sorry for asking at all. Just remember not to take any responses personally, they are only opinions. I think it was a great question and I have learnt from it, so I’m certainly glad you asked it.

    A final thought, if you are doing to it save space, but then need to use JavaScript to create the DOM elements, well it probably isn’t saving any space.

    Have you had a look at haml? http://haml-lang.com/

    #86554
    Johann
    Member

    @joshuanhibbert Well, to be honest, I’m not really doing it (yet)… I seriously found no good reason for it yet, and no reason to look real hard for one, either. But I’ll keep it in mind, and should I ever have to generate so many div’s (with classes and a few chars in them each) programmatically that using “dX” instead would save a reasonable amount of bytes, I’d do it. Hah! :P

    And I don’t feel offended as much as I worry about being offensive. It’s not a topic ranting a lot over I think. I just like to question everything every now and then ^^

    oops, edit:

    “A final thought, if you are doing to it save space, but then need to use JavaScript to create the DOM elements, well it probably isn’t saving any space.”

    You mean the shim taking up more space? As I said, just about anything else I could optimize would save more, I know that ^^ It’s a rather theoretical question really.

    “Have you had a look at haml?”

    Well, it’s ruby so that’s right out for me/my webhost :P

    #86571
    Brightonmike
    Member

    As far as I was aware, HAML just works locally? No? It’s not dynamic, it’s just a shortcut.

    #86587

    @Brightonmike, yeah correct, but would save on typing out excess characters.

    #86627
    fishnfrogs
    Member

    I’ve actually played around with this idea as well. On top of making tags that didn’t exist, I also added attributes and what not to further customize or ‘brand’ my page. For example



    There doesn’t always have to be content in the tags as well — considering I’m sure everyone here has used empty div’s before. The reason I didn’t go past the ‘toying around’ phase was because I wanted my site to be crawlable and there are some necessary tags like Title that I couldn’t live without. My logic was to go big or go home. Well, I went home instead. I say have fun with it. Rules were meant to be broken right?

    #86730
    thomas
    Member

    The main reason creating your own elements is discouraged is similar to the reason you don’t make up your own words in any language: not everyone will understand you. Of course, you can use CSS (and some JS to make IE behave), and browsers will display your new tags as you tell them, but other user agents won’t have a clue what you’re talking about.

    It may seem like <div> doesn’t have any meaning, but it actually does; it means this content is separate from other content — a division. Maybe that isn’t an important meaning to you, but to HTML parsers, it could be a reliable way to group and separate content. In fact, all HTML elements have meaning, some are just more obvious than others.

    As you say, this is for your own personal stuff, so if it works for you, and you don’t care if it only makes sense to people viewing it in a browser, then by all means proceed. Just make sure that you don’t go spreading it around and recommending it to others. Most standards advocates have tried very hard to encourage a standard set of Web languages to make our lives easier, so they don’t take kindly to someone that wants to mess that up.

    #86742
    seb_z_lite
    Member

    wow, that post obfuscated me, It think I m gonna go minify in a corner and play with my W3C standards and my friend J the query…

    #86749
    Johann
    Member

    @fishnfrogs

    “On top of making tags that didn’t exist, I also added attributes”

    well, there’s data-xyz for that now. which is not even *supposed* to make sense to anything beyond the site they are used on.


    @thomas

    “The main reason creating your own elements is discouraged is similar to the reason you don’t make up your own words in any language: not everyone will understand you. Of course, you can use CSS (and some JS to make IE behave), and browsers will display your new tags as you tell them, but other user agents won’t have a clue what you’re talking about.”

    The same goes for spans and divs. They make no sense without the stylesheet, other than grouping content which all tags do.

    “It may seem like

    doesn’t have any meaning, but it actually does; it means this content is separate from other content — a division.”

    ehm. That goes for most tags, and all unknown ones. It’s what the DOM does, make pretty node trees. What you said about the div goes for a, span, h#, all of them. They are “a division”…

    Look, I do realize that if I wanted to save bandwith etc., I might as well send json and construct the HTML on the client via javascript. “Making up tags” is just a thing that is possible, but useless… However, I don’t get anything out of being talked to like a baby ^^

    “Maybe that isn’t an important meaning to you, but to HTML parsers, it could be a reliable way to group and separate content. “

    Not only does it matter to me, it’s a given, and goes for all tags. What you are talking about is moot.

    “Just make sure that you don’t go spreading it around and recommending it to others.”

    lol? How about, unless you actually have a good answer to even ONE of my questions, you don’t worry your head about what I might or might not do? Maybe consider it separation of theoretical questions and practical advice, and ask yourself, can you do it? Can you discuss something theoretically without thinking the sky is falling?

    “Most standards advocates have tried very hard to encourage a standard set of Web languages to make our lives easier, so they don’t take kindly to someone that wants to mess that up.”

    I “want to mess that up”? Hahah. I’m asking a question — which makes movies play in people’s heads, yeah, but that’s not my concern. My concern is what I’m actually doing, which when it comes to making up tags didn’t go farther than jsfiddle. Saying “div is a division”, ignoring that this goes for all tags, is just FUD. That’s not upholding any standard. I at least try to actually know the rules I’m breaking.

    You had to make it seem that way I guess, but ultimately you cannot answer either what the difference (semantically and in practice) between div’s with classes and made up tags is. You claim div tags have meaning even the W3C doesn’t seem to be aware of, and then I’m the one messing stuff up? Awww. ^^

    #86750
    chrisburton
    Participant

    I feel like the same thing is happening like before with the “Table Guy”.

    #86751
    Johann
    Member

    And that is? I’m curious, unless that was something where people mumbled stuff under their breath of course :P

    edit: “the table guy” is probably someone who never uses tables, but asked a question about them, lol?

    #86752
    chrisburton
    Participant

    No. The “table guy” is someone who consistently argued as to why we should still be using tables over CSS.

    #86753
    Johann
    Member

    Well, I’m not the one arguing for something to be used, am I ;) Or the one making up stuff about semantic meanings of tags they don’t have… haha.

    Also, take a look at the wikipedia main page. Turn off stylesheets. Tada, still looks neat thanks to using a table. And no, I don’t use tables myself for layout, but when you, uhhh, need to put stuff in tables, they are perfect — yet some people seem to think it’s “better” not to use them, so they make something awkward with proportionally sized floats and what not: more HTML, more CSS, *still* doesn’t behave like a table….that’s exactly the mindlessness I will have zero to do with :P

    #86755
    chrisburton
    Participant

    Tables are meant for tabular data, not layout.

Viewing 15 posts - 16 through 30 (of 42 total)
  • The topic ‘Making up tags – WHY is it wrong?’ is closed to new replies.