• Stars30.3k+3 tuần này
  • Forks1.9k
  • Watchers649
  • Issues1
  • Ngày tạo21/04/2016
  • Cập nhật gần nhất28/05/2026
  • Ngôn ngữ—
  • Giấy phép—
README.md79.8 KBRaw

🤯 HEAD

A simple guide to HTML <head> elements

Contributors CC0 Follow @joshbuchea on Mastodon

Table of Contents

Recommended Minimum

Below are the essential elements for any web document (websites/apps):

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--
  The above 2 meta tags should come as early as possible in the <head>
  to consistently ensure proper document rendering.
  Any other head element should come *after* these tags.
-->
<title>Page Title</title>

meta charset - defines the encoding of the website, utf-8 is the standard

meta name="viewport" - viewport settings related to mobile responsiveness

width=device-width - use the physical width of the device (great for mobile!)

initial-scale=1 - the initial zoom, 1 means no zoom

Elements

Valid <head> elements include meta, link, title, style, script, noscript, and base.

These elements provide information for how a document should be perceived, and rendered, by web technologies. e.g. browsers, search engines, bots, etc.

<!--
  Set the character encoding for this document, so that
  all characters within the UTF-8 space (such as emoji)
  are rendered correctly.
-->
<meta charset="utf-8">

<!-- Set the document's title -->
<title>Page Title</title>

<!-- Set the base URL for all relative URLs within the document -->
<base href="https://example.com/page.html">

<!-- Link to an external CSS file -->
<link rel="stylesheet" href="styles.css">

<!-- Used for adding in-document CSS -->
<style>
  /* ... */
</style>

<!-- JavaScript & No-JavaScript tags -->
<script src="script.js"></script>
<script

Nội dung README thuộc về joshbuchea và cộng đồng đóng góp, giấy phép Không có giấy phép. Nguồn: github.com/joshbuchea/HEAD