When I go to the W3C validator service, to try out if it complains about using an
<icon> element, with this example:
<!doctype html> <html lang="en"> <head> <title>Title</title> <meta charset="utf-8"/> </head> <body> <icon></icon> </body> </html>
The error that I get back from it says the following:
Error: Element icon not allowed as child of element body in this context. (Suppressing further errors from this subtree.)
From line 8, column 2; to line 8, column 7
Content model for element body: Flow content.
The part where it says "not allowed as child of", suggested to me that the
<icon> element as such may actually exist, but is intended for something else, and therefore doesn't fit there, structurally. But when i go to the MDN HTML elements reference, there is no
<icon> element listed.
Using it works however (I can use it to display a Fontawesome icon), and seeing how HTML5 suggests that we are allowed to make up our own elements (and Angularjs advocates using arbitrary element names for directives), would it actually be bad to use it in practice?
Would it be bad for SEO? Would readers complain? Would parsers complain? Would it not be future-proof?