dcsimg
www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 29

Thread: "New HTML tags"

  1. #1
    Join Date
    Jan 2011
    Location
    Munich, Germany
    Posts
    237

    "New HTML tags"

    Hello all,

    I have invented the following tool "New HTML tags":

    http://4nf.org/

    What do you think of it?


    Thanks in advance and kind regards

  2. #2
    Join Date
    Mar 2012
    Location
    Saint-Petersburg, Russia
    Posts
    97
    Hm... Excuse me, but do you believe the site is self-explanatory?

  3. #3
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    I'm going to take a stab in the dark and guess what it is that you are up to. Please note that "HTML documents are constrained to conform to the HTML DTD both before and after processing any SCRIPT elements." ( http://www.w3.org/TR/REC-html40/inte....html#h-18.2.4 ) I suspect that you are perpetrating an abomination.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  4. #4
    Join Date
    Nov 2002
    Posts
    2,632
    If I were to make new HTML tags, I would just make a XML standard specifically for web pages.

  5. #5
    Join Date
    Jan 2011
    Location
    Munich, Germany
    Posts
    237
    Thanks for both your replies!

    Apart from the "nofollow alternative" with the <an tag the design is that the abbreviations are at the start of text nodes in the DOM. These textual abbreviations are then expanded to arbitrarily complex HTML pieces. If you use a tool like "Firebug" you can see the HTML generated after initial load and should find that it is sound, too, according to any W3C specification.
    Having said that, it may also be breaching the W3C spec to introduce new tags like "fb:like" (Facebooks custom "Like" Tag). What do you think about their approach then?

    Sure introducing custom XML is nice but can you specify replacing arbitrarily complex HTML? With arbitrarily complex HTML I mean blocks ot HTML that may have functionally dependent arguments in JavaScript for example.

    My prime example is the "Facebook Like!" tag. This is expanded from the text node to:

    <div id="fb-root"></div><jscript>(function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/de_DE/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</jscript><div class="fb-like" data-href="%js%window.location.href%sj%" data-send="true" data-width="450" data-show-faces="true"></div>

    (There are two custom bits for handling JS - the "jscript" tag I introduced, which is parsed client side even when using AJAX, in contradiction to normal <script> tags; and %js% + %sj% that enclose JavaScript arguments and return the respective string back.

    If you look at the above example, "Facebook Like!" (14 bytes) is an abbreviation for HTML "worth" about 439 bytes. Also, these tags can be maintained throughout time, offering a layer of abstraction which I can't think of setting up with mid-tier technology like PHP. Furthermore, in the case of the "Twitter!" substitution you save an outoing link:

    <a href='http://twitter.com/share' class='twitter-share-button' data-url='%js%window.location.href%sj%' data-count='horizontal' data-via='%js%window.location.hostname%sj%' data-related='pubcon' data-text='%js%document.title%sj%'>Tweet</a><jscript src="http://platform.twitter.com/widgets.js"></jscript>

    ...which keeps PageRank on the site! What's the point of throwing PR at a PR 9 site??

    So these "new HTML tags" are good value in my opinion. The challenge is now to identify and support more of them to increase the added value of the tool and making it worthwhile to include...

    What do you think of other features like the "Google Analytics Substitution"?


    Cheers!

  6. #6
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    As I suspected, an abomination.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  7. #7
    Join Date
    Jan 2011
    Location
    Munich, Germany
    Posts
    237
    Why, what's so "evil" about what I'm proposing?

    The prime aim is to simplify routine tasks and accelerate time-to-market!

    What's wrong with that?

  8. #8
    Join Date
    Nov 2002
    Posts
    2,632
    1. <jscript> is MS technology.
    2. There just seems to be too much code for something that is suppose to be "A new tag."

  9. #9
    Join Date
    Jan 2011
    Location
    Munich, Germany
    Posts
    237
    Hi Spufi,

    <jscript> tag is the first thing that came to my mind instead of the <script> tag, that doesn't get parsed in AJAX applications, when injected to the DOM.
    No intended connotation with MS ;-) (and I hope they don't use a <jscript> tag)

    If you believe it or not, writing "Facebook Like!", in a certain sense uniquely defines writing:

    <div id="fb-root"></div><jscript>(function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/de_DE/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</jscript><div class="fb-like" data-href="%js%window.location.href%sj%" data-send="true" data-width="450" data-show-faces="true"></div>

    (That's to say, the latter is functionally dependent on the tag. There's only one non-trivial JS parameter: window.location.href)

    I agree it seems a lot of code that has been substituted, but doesn't that make life easier for someone who just uses my tag? Moreover, the underlying code of Facebook may change, but the tag I'm providing will be insulated against that.

  10. #10
    Join Date
    Mar 2012
    Posts
    3
    Well it's not exactly "new" since it seems you still need to put dividers around the text. Nevertheless it looks awesome! Expanding it's word bank will definitely help others.

  11. #11
    Join Date
    Nov 2002
    Posts
    2,632
    And then something processes the page with scripting disabled.

  12. #12
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    What you need is some sort of server side pre-processor. And instead of using new tags you could use processing instructions, <? ... ?>. I'd bet that you could do a lot with something like that.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  13. #13
    Join Date
    Feb 2012
    Location
    youTUBE
    Posts
    234
    It looks like you are trying on one part to help so-called content deliverers to hide/disguise their activities...

    Why does that remind me of a seventies hide the garbage technique?

  14. #14
    Join Date
    Jan 2011
    Location
    Munich, Germany
    Posts
    237
    Thanks for all your replies!

    @Ketamire: Glad you think that this will help others - so do I :-)

    @Spufi: If scripting is disabled, a redirect is issued and the "new HTML tags" are parsed nevertheless. Only JS is not processed then...

    @Charles: What kind of server side pre-processor are you thinking about? Anything specific in mind?

    @WyCnet: It's not supposed to be for disguising activities. There is supposed to be the possibility to hide boring code or links from search-engines, though...

  15. #15
    Join Date
    Jan 2011
    Location
    Munich, Germany
    Posts
    237
    Whatever should become of this thread, just wanted to say special thanks to "Ketamire" for the support! You've obviously seen the "simplicity" in using it, which is intended from the start. On an different note, I know by now how hard it is to give support in public, where our daily news is "not exactly" doing a good job of that.

    You must be a very brave man!

    (just thought I have to give "full credit" on that one ;-) )

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles