Do not attach if document type is not html.