search

Home  >  Q&A  >  body text

Why should web pages declare <!DOCTYPE html>

Why should the web page declare <!DOCTYPE html> Isn’t .html just an html document? Could it be that .html can also be other types of documents

**推广网**推广网2377 days ago1395

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2018-08-10 13:44:22

    <!DOCTYPE html> is the standard mode of w3c. If it is not marked, the browser will parse and render the page in its own way, so different styles will be displayed in different browsers. Once you mark it, the browser will have to parse and render the page in accordance with W3C standards. In this way, your page will appear the same in all browsers

    reply
    0
  • Cancelreply