6

Sometimes I find it useful to be able to suppress certain markup validation warnings within files that contain HTML (ASPX, etc.).

Is there an equivalent of #pragma warning disable\restore for HTML?

Saeb Amini
  • 23,054
  • 9
  • 78
  • 76

1 Answers1

4

There are similar questions around, see this and that.

Unfortunately there is no solution to do it selectively. Only a global turn-off of the validation will hide those warnings.

Community
  • 1
  • 1
Dio F
  • 2,458
  • 1
  • 22
  • 39
  • 2
    Yes, turning it off globally seems to be the only way to hide warnings. I hope it gets implemented in the next versions. – Saeb Amini Nov 12 '12 at 19:00
  • 1
    Does this still appear to be the case? I'm getting warnings about nesting a 'div' element under a 'dl' element in VS 2019, which /should/ be allowed. – Noel Dec 18 '20 at 16:28