Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: HTML custom tags and attributes

  1. #11
    Join Date
    Oct 2005
    Location
    Seattle, WA
    Beans
    494
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HTML custom tags and attributes

    If you want to use your own tags, you must convert it to standard HTML before sending it to the browser. You can also write Javascript to do this for you on the browser side.

    Again, check out Spry, Dojo, or any other framework that allows you to specify something like a toolbar on your page using their existing functions.
    www.runtime-era.com - Blog About My Journey as a Developer

  2. #12
    Join Date
    Oct 2006
    Location
    Argentina
    Beans
    584
    Distro
    Ubuntu

    Re: HTML custom tags and attributes

    Thanks all for the answers. As you may have realized I am no expert.

    Quote Originally Posted by Hellkeepa View Post
    It's not a matter of what I want to call it, or not, I'm afraid. It's a matter of whether it follows the standard, or not. Same way I can't add a whole lot of random words to my post, and still say it's all in English.
    But you can say that it is in English plus a whole lot of random words...
    That's exactly what I want to do, HTML plus some custom tags.

    Quote Originally Posted by Hellkeepa View Post
    What you might want to do, is to research micro-formats. Either that, or use XML to define your own version of HTML, as this is the only solution to your question as it stands. Though, as previously have mentioned (three times already) browsers are unlikely to be able to parse your custom format. Something which, most likely, will lead to strange bugs.
    Any example on those strange bugs?

    Quote Originally Posted by Hellkeepa View Post
    Since you have given us precious little information on what you're trying to accomplish, other than that you want to use your own custom tags in a HTML-page for whatever reason, we can't give you more specific help than what's already given. For instance, you haven't even answered on the question of whether or not you're using a web browser, embedded rendering engine, or your own custom one. We're just assuming you're talking about a web page in a web browser here.
    Yes, I am using a web browser: firefox.

    Quote Originally Posted by Hellkeepa View Post
    By answering on the "why", instead of "what I want to do", we are in a much better position to give you more accurate help.
    Well... the answer to the "why" question is just: To have a more clear, understandable code.

    Quote Originally Posted by wmcbrine View Post
    "Not working at all" isn't a real prolem?
    I tried replacing <div class=toolbar> by <toolbar>
    Then I changed the css to match the tag instead of the class and I only had to add display:block; and it worked...

    Quote Originally Posted by era86 View Post
    If you want to use your own tags, you must convert it to standard HTML before sending it to the browser.
    Why? I really don't know... If that were the case it would make it more complicated instead of simplifying things...

    Quote Originally Posted by era86 View Post
    Again, check out Spry, Dojo, or any other framework that allows you to specify something like a toolbar on your page using their existing functions.
    I'm using jQuery.

  3. #13
    Join Date
    Jun 2008
    Beans
    Hidden!

    Re: HTML custom tags and attributes

    why is everyone else being such a prick in their responses to you?

    well here's my two cents:

    unfortunately, that would be not too good of an idea, because of how different browsers interpret different things (especially internet explorer!). technically, yes, it would work, but only in your browser of choice, in another browser, it will most-likely not work. also, the w3c's standards which browsers nowadays adhere to and follow the rules of, say that it is inconsistent to do that because of how browsers interpret the html/css.

    you can check your html with the w3 xhtml validator, and your css with the w3 css validator to keep the web clean.

    the reason these standards were invented, was because web designers would actually do this, and since browsers don't always know how to interpret that information -- as opposed to a div, ul, or etc, which the browser already understands -- websites would look good in netscape, and bad in IE, or vice versa.

    hope that helps!

    Edit:
    just a side-note, it will work, but it's just that it will not be as reliable as if you just stuck to the w3c's specifications - you can do it, and it will most likely work now that browsers are becoming more standards-compliant, but it's really just a better idea, if not for yourself, then for the internet and its websites as a whole to try and keep it clean
    Last edited by forgetclosure; December 19th, 2009 at 10:55 AM.

  4. #14
    Join Date
    Oct 2006
    Location
    Argentina
    Beans
    584
    Distro
    Ubuntu

    Re: HTML custom tags and attributes

    That was the answer I was looking for.
    Thank you very much forgetclosure!
    And thank you all, I have learned some new stuff.

  5. #15
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: HTML custom tags and attributes

    HTML5 actually adds quite a few new tags with English descriptive names, which is sort of what you want - and something you can start using right now. For example, there is the new 'header', 'nav', 'article' tag etc.

    So, either use HTML4.01 strict with the current tags - or start using HTML5 strict with the new tags (which of course, wont be supported in all browsers since HTML5 is still a drafting spec).

  6. #16
    Join Date
    Jun 2008
    Beans
    Hidden!

    Re: HTML custom tags and attributes

    Quote Originally Posted by AlexC_ View Post
    HTML5 actually adds quite a few new tags with English descriptive names, which is sort of what you want - and something you can start using right now. For example, there is the new 'header', 'nav', 'article' tag etc.

    So, either use HTML4.01 strict with the current tags - or start using HTML5 strict with the new tags (which of course, wont be supported in all browsers since HTML5 is still a drafting spec).
    unfortunately, there are plenty of browsers that don't support html5: internet explorer 6, internet explorer 7, internet explorer 8, opera 10; firefox 3.5 and google chrome are partly supported, but not everything.

  7. #17
    Join Date
    Jun 2008
    Beans
    Hidden!

    Re: HTML custom tags and attributes

    Quote Originally Posted by Yuzem View Post
    That was the answer I was looking for.
    Thank you very much forgetclosure!
    And thank you all, I have learned some new stuff.
    no problem

  8. #18
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: HTML custom tags and attributes

    Quote Originally Posted by forgetclosure View Post
    unfortunately, there are plenty of browsers that don't support html5: internet explorer 6, internet explorer 7, internet explorer 8, opera 10; firefox 3.5 and google chrome are partly supported, but not everything.
    I know: "(which of course, wont be supported in all browsers since HTML5 is still a drafting spec)."

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

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