• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Get Rid of "Doctype Must Be Declared First" Alert

Community Beginner ,
Sep 10, 2022 Sep 10, 2022

Copy link to clipboard

Copied

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.

TOPICS
Code , Error

Views

813

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 10, 2022 Sep 10, 2022

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 10, 2022 Sep 10, 2022

Copy link to clipboard

Copied

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 & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 12, 2022 Sep 12, 2022

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 12, 2022 Sep 12, 2022

Copy link to clipboard

Copied

LATEST

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

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines