What is the difference between <doctype html> and <DOCTYPE html>?

There is no functional difference between <doctype html> and <DOCTYPE html>.

Both are valid and will work the same way in browsers. The choice between lowercase and uppercase is a matter of convention, with lowercase being more commonly used in modern HTML documents.

<!DOCTYPE html>
<html>
  <head>
    <title>Sample Page</title>
  </head>
  <body>
    <p>Hello, world!</p>
  </body>
</html>
More cards3
Show all