Do values in CSS attribute selector values need to be quoted?

前端 未结 4 1556
感情败类
感情败类 2020-12-18 05:55

e.g.:

a[href=\"val\"]

Does \"val\" need to have quotes around it? Single or double are acceptable? What about for integers?

4条回答
  •  感情败类
    2020-12-18 06:48

    They do not need to be quoted.

    There is also no distinction between strings/doubles/integers. CSS isn't Turing-complete, let alone typed.

提交回复
热议问题