Specifying an implicit document type for an HTML, XHTML, or JSP fragment
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 using JSP include or server-side include.
To assign an implicit document type to an HTML, XHTML, or JSP fragment, do the following:
- From the Project Explorer view, select the HTML, XHTML, or JSP fragment.
- Select Properties from the file's pop-up menu.
- In the Web Content Settings page, select the desired DOCTYPE from the Document type drop-down list.
The Properties dialog for Web projects also includes an Web Content Settings page, where you can specify project-default HTML document type. This setting will be 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.