2 ms·
"The snippet `<!DOCTYPE html>` is an instruction to the web browser that the document is written in HTML5. This is important because it tells the browser how to
by awesomeMilou 3y ago
"The snippet `<!DOCTYPE html>` is an instruction to the web browser that the document is written in HTML5. This is important because it tells the browser how to interpret the code and display the content correctly."
So.. what happens when the DOCTYPE tag isn't there?
"Answer: Without the DOCTYPE tag, the browser won't know which version of HTML to use to display the page. This could cause the page to look different than it was intended."
Well.. yeah that's _sort of_ what happens, but I wouldn't call that teaching. I (and students for that matter) can infer this from context. I know that my intro course to web development specifically used the DOCTYPE tag as a segue to talk about different HTML versions, the HTML standardization process and specifically, that the browser enters quirks mode when it's not present.
Right now it feels like the AI is more on the level of a university student that's slightly ahead of you in the material.