View Poll Results: What do you think?

Voters
0. You may not vote on this poll
  • Good Idea (All browsers Support)

    0 0%
  • Good Idea (It supportable by the most browsers)

    0 0%
  • Good Idea (I don't know)

    0 0%
  • Bad Idea (I don't know)

    0 0%
  • Bad Idea (Not supportable by the most browsers)

    0 0%
+ Reply to Thread
Results 1 to 3 of 3

Thread: Custom HTML Tags, Good Idea?

  1. #1
    ZharkD's Avatar
    ZharkD is offline Retired ZharkD is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    MX
    Posts
    5,914

    Lightbulb Custom HTML Tags, Good Idea?

    Hello,

    I would to know what do you think about use custom <tags></tags> in html.
    I don't know if all the browsers support them. I only have tested on FF XD

    Example:
    Code:
    ...
    <style>
    my1tag {}
    my2tag {}
    </style>
    </head>
    <body>
    <my1tag>text here :)</my1tag>
    <my2tag>something else here</my2tag>
    ...
    What do you think?
    Last edited by ZharkD; 03-07-2010 at 11:23 AM.

  2. #2
    marshian's Avatar
    marshian is offline x10 Elder marshian is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    Belgium
    Posts
    526

    Re: Custom HTML Tags, Good Idea?

    Try running them through the W3C validator, it'll fail.
    No browser is required to "support" them, as far as the HTML standards are concerned, they don't exist. If everyone would be allowed to declare their own tags as they wish, browsers will soon start supporting them out of the box. Perhaps things like a <warning> tag. The browser would then show a warning in the normal style. You think that's good? What happens on browsers who don't support the <warning> tag? What happens when you finally make the warning look good in one browser? In both cases, yes, it'll be messed up. People will rely on it though, causing webpages to become browser-specific (again). As you might recall, that's not a good thing.
    The alternative is to keep it the way things are. You can use any tag, like <div> and style it like you want, using CSS. Problem solved.

    Besides, ignoring anything else there are two remarks that stand, no matter what.
    1. HTML should only be used to express the document structure, not the style. Use CSS for any styling.
    2. Why? You wouldn't be able to do anything more than you can now. Is typing <div class="customstyle"> so much more work?
    Real programmers don't document their code - if it was hard to write, it should be hard to understand.

  3. #3
    misson is offline Community Advocate misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,391

    Re: Custom HTML Tags, Good Idea?

    If you want custom tags, you could adapt the HTML DTD and reference your version in the DOCTYPE. That would be the W3C approved way, though some browsers may not work well with custom doctypes.

    There needs to be another poll answer, something along the lines of "Bad idea (Unpredictable results)".
    Last edited by misson; 03-07-2010 at 03:31 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Similar Threads

  1. unneccessary Image Html tags appearing
    By balaji2u in forum Scripts & 3rd Party Apps
    Replies: 1
    Last Post: 11-18-2008, 11:14 AM
  2. PHP And HTML Div Tags
    By masterjake in forum Programming Help
    Replies: 5
    Last Post: 10-22-2008, 03:00 AM
  3. html tags - help anyone?
    By ispital in forum Programming Help
    Replies: 15
    Last Post: 05-02-2008, 07:51 AM
  4. HTML tags
    By callumacrae in forum Crossfire
    Replies: 21
    Last Post: 02-20-2008, 12:39 PM
  5. PHP remove html/other uncessary tags? - need help
    By a-a-a in forum Scripts & 3rd Party Apps
    Replies: 8
    Last Post: 10-30-2007, 08:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers