- 2

How this tag is working?

Checkout my code. In this code, you'll see that I've written "Hello" between <zxcvbnm> tag and changed it background-color. But in HTML, there is no tag such as <zxcvbnm>. Then how is it working? https://code.sololearn.com/WqsG8y8x0R3o/?ref=app

25th Jul 2021, 3:56 AM
Dipro Biswas
11 Respuestas
+ 6
Yeah, mainly HTML can take any unknown tag, it will actually work. But I don't know why this unknown tags work. Like : 'xjdhcrhjdjg', 'hblgjfigjgjf', 'higtfhfkdkg', etc
25th Jul 2021, 5:09 AM
ÃÑSHÙ KHÁÑRÂ
ÃÑSHÙ KHÁÑRÂ - avatar
+ 5
Nope. They can't create there own tag
26th Jul 2021, 8:59 AM
ÃÑSHÙ KHÁÑRÂ
ÃÑSHÙ KHÁÑRÂ - avatar
+ 5
But I don't know why HTML accepts it...
26th Jul 2021, 9:01 AM
ÃÑSHÙ KHÁÑRÂ
ÃÑSHÙ KHÁÑRÂ - avatar
+ 4
Anshu Khanra But there is no background-color. The user is asking for that. Btw body is also a tag.
25th Jul 2021, 4:59 AM
A͢J
A͢J - avatar
+ 2
It worked because you described it in CSS...that means HTML5 may have treated it like a tag name for use in CSS
26th Jul 2021, 8:59 AM
Kikomeko Markarious
Kikomeko Markarious - avatar
+ 2
Dipro Biswas Anshu Khanra HTML is XML based language so as you can define any tag as you want in XML you can do the same in HTML. HTML is a simple particular XML convention.
27th Jul 2021, 12:23 AM
Elon
Elon - avatar
+ 2
If you define your own tags all will run very well, your web page will be rendered but your web page will not be recognised as a correct web page on the web because it don't match the HTML convention. XML is used to format documents and HTML is XML specialised in web documents formating.
27th Jul 2021, 12:33 AM
Elon
Elon - avatar
- 1
I think people can create their own tags and define it's function.
26th Jul 2021, 8:39 AM
Adehunoluwa Praise
Adehunoluwa Praise - avatar
26th Jul 2021, 9:08 AM
Adehunoluwa Praise
Adehunoluwa Praise - avatar
- 3
Anshu Khanra DOM architecture. HTML DOM generated from utf8 text file might not support it. And it might not be supported by JavaScript to update tag attribute and property. DHANANJAY PATEL
27th Jul 2021, 3:28 AM
DHANANJAY PATEL
DHANANJAY PATEL - avatar