我想弄清楚为什么要将类属性分配给标题标签,以及这样做是好是坏。
最佳答案
Is it possible to assign a class attribute to title?
是的。
来自 the spec :
Every HTML element may have a class attribute specified.
why a class attribute would be assigned to the title tag
大概是允许用JS或者CSS来选择吧。我想不出为什么有人会在可以使用 document.title
或类型选择器时想要这样做。
关于html - 是否可以将类属性分配给标题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46683417/