What's the point of valid CSS/HTML?

前端 未结 17 1941
梦如初夏
梦如初夏 2020-11-30 06:40

If I\'ve tested my pages in most major browsers, why would I need to maintain a validated code? I want to use box-shadows and corner radius if they\'re supported in WebKit b

17条回答
  •  一生所求
    2020-11-30 07:11

    You should always have valid (X)HTML because there are very few occasions where the benefits of not having valid code outweighs the benefits of not having validated code.

    For CSS, however, there is little reason to be as strict. All your CSS should be proper and work as intended, follow best practices and optimize where possible. Other than that, use all the browser specific experimental stuff you want, it won't noticably affect other browsers.

提交回复
热议问题