<base>
ใช้กำหนด URL พื้นฐานที่ใช้สำหรับทุก URL แบบสัมพัทธ์ในเอกสารเดียวกัน โดยสามารถมี
<base>
element ได้เพียงหนึ่งอันในเอกสาร
Attribute | description |
---|---|
href | URL ที่ใช้เป็น base สำหรับ relative URLs ภายในเอกสาร |
target | กำหนด target window หรือ frame ที่จะเปิดลิงก์ เช่น _self , _blank , _parent , หรือ _top |
<head>
ประกอบไปด้วยข้อมูลที่เป็นเครื่องจักรอ่าน (metadata) เกี่ยวกับเอกสาร เช่น ชื่อเรื่อง, สคริปต์, และ style sheets
<link>
ใช้กำหนดความสัมพันธ์ระหว่างเอกสารปัจจุบันกับทรัพยากรภายนอก โดยทั่วไปจะใช้เชื่อมโยงกับ CSS แต่ยังใช้กำหนดไอคอนเว็บไซต์ (เช่น "favicon") และไอคอนสำหรับหน้าจอหลักและแอพพลิเคชันบนอุปกรณ์เคลื่อนที่
Attribute | Description |
---|---|
href | URL ของ resource ที่จะถูกเชื่อมต่อ |
rel | ระบุความสัมพันธ์ระหว่างเอกสารและ resource |
type | ประเภทของ MIME ของ resource |
media | ระบุว่า resource นี้ใช้กับสื่อชนิดไหน |
hreflang | ภาษาของ resource ที่เชื่อมต่อ |
sizes | ขนาดของ icons (ใช้กับ rel="icon") |
crossorigin | ระบุว่าควรใช้ CORS หรือไม่ |
<meta>
แทนข้อมูลที่ไม่สามารถใช้กับ meta-related elements อื่นๆ เช่น
<base>
,<link>
,<script>
,<style>
และ<title>
Attribute | Description |
---|---|
name | ระบุชื่อของ metadata |
http-equiv | ให้ metadata แสดงเหมือน HTTP headers |
content | เนื้อหาของ metadata |
charset | ระบุ character encoding ของเอกสาร |
viewport | ระบุการตั้งค่า viewport (ใช้ในการ responsive) |
<style>
ใช้สำหรับเก็บข้อมูล style ของเอกสารหรือส่วนหนึ่งของเอกสาร ซึ่งประกอบด้วย CSS ที่จะถูกนำไปใช้กับเนื้อหาของเอกสารที่มี element นี้
Attribute | Description |
---|---|
type | ประเภทของ style sheet (เช่น "text/css") |
media | ระบุว่า style นี้ใช้กับสื่อชนิดไหน |
scoped | ระบุให้ style มีผลเฉพาะใน scope ที่กำหนด |
<title>
กำหนดชื่อเรื่องของเอกสารที่จะปรากฏในแถบชื่อของเบราว์เซอร์หรือแท็บของหน้าเว็บ โดยจะมีเพียงข้อความเท่านั้น; แท็กภายใน element นี้จะถูกมองข้าม