Specifying the document type declaration (DOCTYPE) for web pages

About this task

An implicit document type is used for content assist (Ctrl+Spacebar), the Properties view, and other editing contexts when no DOCTYPE declaration is specified in an HTML, XHTML, or JSP file. Typically, this feature is used for a fragment (partial document) that can be included in other pages by using JSP include or server-side include.

To assign an implicit document type to an HTML, XHTML, or JSP fragment:

Procedure

  1. From the Enterprise Explorer view, select the HTML, XHTML, or JSP fragment.
  2. Select Properties from the file's menu.
  3. In the Web Content Settings page, select the wanted DOCTYPE from the Document type list.

    The Properties dialog for web projects also includes a Web Content Settings page, where you can specify project-default HTML document type. This setting is used if no DOCTYPE declaration is specified in the file, and no default document type is specified in the Web Content Settings page on the Properties dialog for the file.

Icon that indicates the type of topic Task topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: tspecifyimplicitdoctype.html