Skip to main content

HTML Page Starter

Boilerplate สำหรับหน้า HTML แบบ single-file (workshop hub, materials pack, live series page ฯลฯ) — ใช้ร่วมกับ CSS variables จาก CSS Variables Guide

<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>B.Grimm — ชื่อหน้า</title>

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;700&family=Open+Sans:wght@400;600;700&display=swap"
rel="stylesheet"
/>

<style>
:root {
--bg: #ffffff;
--primary: #ff6727;
--primary-dark: #c43400;
--text: #63666f;
--text-strong: #202124;
--muted: #989aa5;
--border: #d9dae4;
--font-heading: 'Source Serif Pro', 'Times New Roman', serif;
--font-body: 'Noto Sans Thai', 'Open Sans', Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
margin: 0;
font-family: var(--font-body);
color: var(--text);
background: var(--bg);
line-height: 1.5;
}
h1, h2 { font-family: var(--font-heading); color: var(--text-strong); }

.navbar {
position: sticky; top: 0;
display: flex; align-items: center; justify-content: space-between;
padding: 16px 32px;
background: rgba(255, 255, 255, 0.88);
backdrop-filter: blur(8px);
border-bottom: 1px solid var(--border);
}
.navbar img { height: 32px; }

.hero {
padding: 96px 32px;
text-align: center;
}
.hero h1 { font-size: 56px; margin: 0 0 16px; }
.hero p { font-size: 20px; color: var(--text); }

.btn-primary {
display: inline-block;
padding: 8px 16px;
background: var(--primary);
color: #fff;
font-weight: 700;
font-size: 14px;
border-radius: 8px;
text-decoration: none;
transition: background 0.2s ease;
}
.btn-primary:hover { background: var(--primary-dark); }

section { max-width: 1320px; margin: 0 auto; padding: 64px 32px; }

@media (prefers-reduced-motion: reduce) {
* { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
</style>
</head>
<body>

<nav class="navbar">
<img src="https://www.bgrimmpower.com/themes/default/assets/static/images/default/logo/logo-bgrim.svg" alt="B.Grimm Logo" />
<a class="btn-primary" href="#contact">ติดต่อ</a>
</nav>

<header class="hero">
<h1>หัวข้อหลักของหน้า</h1>
<p>คำอธิบายสั้นๆ ใต้หัวข้อ — Dark Grey ไม่ใช่สีส้ม</p>
</header>

<section id="content">
<!-- เนื้อหาหลัก -->
</section>

</body>
</html>

หมายเหตุ​

  • ใช้ Google Fonts <link> สำหรับ Noto Sans Thai/Open Sans — ส่วน Source Serif Pro ไม่มีบน Google Fonts ในชื่อนี้ตรงๆ ให้โหลดจาก Adobe Fonts หรือ fallback เป็น Times New Roman ตามที่กำหนดใน Typography
  • ห้ามลบ @media (prefers-reduced-motion: reduce) block ออก — เป็นกฎบังคับตาม Animation Guidelines
  • โครง nav + hero + section นี้คือจุดเริ่มต้นเท่านั้น ไม่ใช่ layout บังคับ — ปรับ section ภายในได้ตาม Layout & Navigation