Skip to main content
Participating Frequently
Sep 10, 2022 10:31 PM UTC
Question

Get Rid of "Doctype Must Be Declared First" Alert

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 is closed to new replies. Start a new post to keep the conversation going.

4 replies

Jon Fritz
Community Expert
Community Expert
Sep 12, 2022 1:18 PM UTC

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

Translate
Nancy OShea
Community Expert
Community Expert
Sep 12, 2022 6:35 PM UTC

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

 

Translate
Nancy O'Shea— Product User & Community Expert
Nancy OShea
Community Expert
Community Expert
Sep 11, 2022 12:04 AM UTC

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.

 

 

 

Translate
Nancy O'Shea— Product User & Community Expert
Community Expert
Sep 10, 2022 10:37 PM UTC

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.

Translate