3 ms·
Is this related to the most minimal valid HTML? No HTML tag there. <!DOCTYPE html><title> </title>
by therealmarv 3y ago
Is this related to the most minimal valid HTML? No HTML tag there.
<!DOCTYPE html><title> </title>
- zamadatix 3y agoIt doesn't seem particularly related as <title> has about the same percentage: https://caniuse.com/mdn-html_elements_title https://caniuse.com/mdn-html_elements_title. Rather it seems more to do with how it counts browsers it knows the usage of but doesn't have validation of support one way or the other for. Trivia: That HTML is actually invalid, <title> </title> gets treated as a blank title, which is not valid. If you change it to <title>.</title> or similar it should be error free though.
- runarberg 3y agoIsn’t there an <html> tag there though? It is just untyped, and therefor inferred. If you open this page with any browser, it will contain an <html> tag.
- deleted 3y ago[deleted]
- Mogzol 3y agoThe difference is that it is actually valid according to the HTML spec. Browsers will render lots of invalid HTML which is shorter than that, but if you put such HTML in a validator such as [1], it will have errors. Putting <!DOCTYPE html><title>.</title> in that validator returns no errors (it does have a warning though). Although in response to OP's question, no, I don't think it is related. [1] https://validator.w3.org/nu/#textarea https://validator.w3.org/nu/#textarea
- chrismorgan 3y agoWhen framed in a protocol that can convey a title otherwise, such as email with its Subject header, <title> is optional. So the shortest valid HTML is just <!DOCTYPE html> and no more—it’s just only valid in certain contexts.