3 ms·
XHTML works fine even without a doctype actually (or with a <!DOCTYPE html>). The stricter syntax is a double-edged sword though, I agree.
by notpushkin 4y ago
XHTML works fine even without a doctype actually (or with a <!DOCTYPE html>). The stricter syntax is a double-edged sword though, I agree.
- mort96 4y agoWon't the browser just interpret that as an HTML document then?
- notpushkin 4y agoNope. The thing that browser looks for is the Content-Type header – if it's set to application/xhtml+xml, it will parse the document as XHTML. For static sites, just setting extension to .xhtml is usually enough.