npm install posthtml-doctypePostHTML plugin to simplify working with doctype.
``js
var posthtml = require('posthtml'),
html = '
posthtml()
.use(require('posthtml-doctype')({ doctype: 'HTML 5' }))
.process(html)
.then(function(result) {
console.log(result.html);
//
Options
###### { doctype : 'HTML 5' }
`html
`###### { doctype : 'HTML 4.01 Strict' }
`html
`###### { doctype : 'HTML 4.01 Transitional' }
`html
`###### { doctype : 'HTML 4.01 Frameset' }
`html
`###### { doctype : 'XHTML 1.0 Strict' }
`html
`###### { doctype : 'XHTML 1.0 Transitional' }
`html
`###### { doctype : 'XHTML 1.0 Frameset' }
`html
`###### { doctype : 'XHTML 1.1' }
`html
``