Skip to content

Instantly share code, notes, and snippets.

@alyssaq
Last active February 13, 2024 07:55
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save alyssaq/37645ef8af51768677e2 to your computer and use it in GitHub Desktop.
Save alyssaq/37645ef8af51768677e2 to your computer and use it in GitHub Desktop.
HTML5 skeleton template
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>App</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script charset="utf-8" src="js/app.js"></script>
<link rel="stylesheet" href="css/app.css" />
</head>
<body>
<h1>Hello!</h1>
</body>
</html>
@jannst
Copy link

jannst commented Jan 17, 2021

Very useful. Thanks!

@Swanya-Elvis-Ontita
Copy link

superb

@PomWhite
Copy link

PomWhite commented Sep 9, 2021

Awesome thank you!

@xpe
Copy link

xpe commented Jun 11, 2023

Almost, but not quite.

The default value of lang is unknown, therefore it is recommended to always specify this attribute with the appropriate value. ~ https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang

So, if the page language is...

  • U.S. English, use: <html lang="en-US">
  • British English, use: <html lang="en-GB">
  • English (but regional variation unspecified), use: <html lang="en">
  • and so on

References

  1. https://www.w3.org/International/articles/language-tags/ also.

  2. https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang

The lang global attribute helps define the language of an element: the language that non-editable elements are written in, or the language that the editable elements should be written in by the user. The attribute contains a single "language tag" in the format defined in RFC 5646: Tags for Identifying Languages (also known as BCP 47).

@Oyedele-Timileyin
Copy link

good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment