Try a forum for Dreamweaver.
The Linting in DW CC2018 only fires after saving. If you haven't saved the file there, it won't alert you to errors and inconsistencies.
In earlier versions it fired on open, change and save.
Does the 2018 version have this function?
Yes, CC2018 has Linting in HTML and CSS files that will show whichever errors it is set to display as red line numbers in Code View.
You can verify it is turned on under Edit > Preferences > Linting > make sure "Enable Linting" is checked.
I looked for it and found that I had opened the examination, but my obvious mistake was still unchecked.
Look, I've set it up make sure "Enable Linting" is checked.
My CC2018 no longer recognizes any error with your code either.
The Linter in DW is extremely limited in the errors/inconsistencies it actually shows.
I haven't used Linting for anything since it was added to DW and told me "double quotes are required on html attributes".
I turned it off a long time ago and stick with W3C validation tools for html and css and JSLint for javascipt.