HTML !DOCTYPE With Example
HTML !DOCTYPE element:
The HTML <!DOCTYPE> tag is the very first line in the HTML document. It tells the browser what version of HTML the document is written so that the browser knows what to expect. This tag is also commonly referred to as the <!DOCTYPE> element.
The syntax for the <!DOCTYPE> tag varies between on the version of HTML or XHTML you are using. Let's look at the most common usages.
The <!DOCTYPE html> declaration is used to inform a website visitor's browser that the document being rendered is an HTML document. While not actually an HTML element itself, every HTML document should being with a DOCTYPE declaration to be compliant with HTML standards.
Browser Support
- Chrome
- Android
- Firefox (Gecko)
- Firefox Mobile (Gecko)
- Internet Explorer (IE)
- Edge Mobile
- Opera
- Opera Mobile
- Safari (WebKit)
- Safari Mobile