+ 1
Is it possible to create custom tag like p or h1 in html5?
3 Respuestas
+ 8
Since html is based on xml, yes. you are free to do :
<custom>123</custom>
and grab it in js too like document.getElementByTagName('custom')[0]
but might throw annoying console warnings if not registered through javascript code...
0
Just to save you future frustration I had.
To access the property values of a custom tag you need to use .getAttribute("name")