?
Solved

User defined tags?

Posted on 2005-05-01
5
Medium Priority
?
177 Views
Last Modified: 2010-04-09
I learned a bit of HTML a few years ago and I have a vague recollection about reading something about "user made tags" but I can't find anything.

My question: Is it acceptable to define an HTML tag, for example <H23></H23> or <Ha></Ha>? My vague recollection is that HTML would consider it as invalid and ignore it which would be perfect for what I want to do because this tag can be used by scripts.

If you have a better idea to achieve the same goal then I'd definitely welcome your examples.

Thank you for your help.
0
Comment
Question by:rblampain
  • 2
  • 2
5 Comments
 
LVL 30

Accepted Solution

by:
GrandSchtroumpf earned 1200 total points
ID: 13907546
Use defined tags are not allowed in html.

The closest thing you can do is to use the "class" attribute:
<div class="Ha">Hello</div>

Then you can use CSS to style your class:
div.Ha {
  color: red;
}
0
 
LVL 19

Assisted Solution

by:DreamMaster
DreamMaster earned 800 total points
ID: 13907767
You should not use this trick to use it for scripts. Yes, they are ignored in HTML and therefor it would seem that it does what you would like, and NO it's not good to do it that way. Better is to use the method GrandSchtroumpf suggested, or something similar.

Regards,
Max.
0
 

Author Comment

by:rblampain
ID: 13909067
Thank you both. I won't upset the HTML interpreter, I can solve my problem some other way.
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 13909099
Glad to have been helpful :)

Regards,
Max.
0
 
LVL 30

Expert Comment

by:GrandSchtroumpf
ID: 13909109
<:°)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question