Skip to main content
Participating Frequently
September 10, 2022
Question

Get Rid of "Doctype Must Be Declared First" Alert

  • September 10, 2022
  • 3 replies
  • 1786 views

I'm working on a body of code that won't ever have a doctype, but this alert is in the way.  How do I disable the "Doctype Must Be Declared First" alert, and any others like it?  I can't find it in my preferences.

This topic has been closed for replies.

3 replies

Jon Fritz
Community Expert
Community Expert
September 12, 2022

If you don't want DW to check your code for errors as you go, you can turn that off.

Go to Edit > Preferences > Linting > uncheck the box for Enable Linting > hit Apply

Nancy OShea
Community Expert
Community Expert
September 12, 2022

Keep in mind that DW can choke on bad syntax even when Linting is disabled.

 

Nancy O'Shea— Product User & Community Expert
Nancy OShea
Community Expert
Community Expert
September 11, 2022

And you won't find it in Preferences.  HTML documents must have doc type declaration.

 

My advice is to use another file type.  Depending on the code you're creating, use JavaScript, JSON, PHP or plain .txt file instead of HTML.

 

 

 

Nancy O'Shea— Product User & Community Expert
Community Expert
September 10, 2022

If you want Dreamweaver to validate your code it needs to know the doctype in order to validate.  There's no way to override and tell DW that you are working in a particular type of HTML file without having that information. I would just ignore the error and work as you were.