Custom HTML Tags, Good Idea?

What do you think?

  • Good Idea (All browsers Support)

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

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

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

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

    Votes: 0 0.0%

  • Total voters
    0

TonnyORG

I Code Things
Community Support
Messages
5,907
Reaction score
16
Points
38
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:

marshian

New Member
Messages
526
Reaction score
9
Points
0
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?
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
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:
Top