Is it alright to add custom Html attributes?

前端 未结 11 798
醉梦人生
醉梦人生 2020-12-14 02:23

I have a site I\'m working on where I want to mark if a row of data has been changed. If something has been changed in that row I would mark it with a custom attribute like

11条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-14 02:57

    This will prevent your page from validating I think, since you are adding custom attributes that the validators won't know about.

    You might be able to do this with your own DTD or schema, but that's more work.

    Your second example is the right way to do this I think. The right direction anyway.

提交回复
热议问题