Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using a trailing dash in a custom HTML Tag

Tags:

html

I've been reading about custom HTML tags and how they should ALWAYS contain a dash (-).

Now some of the examples I've seen has used a prefix-name (ie. '<x-tagname>') type format in their custom elements. I don't want to use a prefix, so I'm wondering if using a trailing dash is also valid? I couldn't find any sources on this matter.

For example:

<wrapper->
  <profile->
  <!-- Some content -->
  </profile->
</wrapper->

Would this be considered valid?

like image 780
Sebastian Olsen Avatar asked Feb 01 '26 11:02

Sebastian Olsen


1 Answers

I believe that what you want to do is doable. As long as you have a dash - somewhere in the name and as long as it is all lowercase - you are good to go. There is a list of not allowed names that are reserved: annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph

like image 122
Yudishtira Avatar answered Feb 03 '26 03:02

Yudishtira



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!