Change document type in ASP.NET

I tried changing the doctype from XHTML 1.0 to HTML5 doctype by changing the doctype line in Site.Master.cs . However, after the change, the HTML5 tags are still not recognized in Visual Studio 2010. Is there anything else I have to do to get it working?

+4
source share
2 answers

Right-click on the toolbar at the top and enable the "Edit HTML Source" toolbar.

Then you can select the target scheme to test from the drop-down list.

enter image description here

NOTE Make sure you are viewing the aspx page that appears greyed out otherwsie

+8
source

Here is an alternative solution that will work no matter what type of page you are viewing:

Tools → Options ... → Text Editor → HTML → Validation

Select "Target:" from the drop-down list that you want to use for verification.

+2
source

Source: https://habr.com/ru/post/1395389/


All Articles