Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> HTML

วิธีสร้าง Bibliography (รายการอ้างอิง) ใน HTML

Bibliography คือรายการหนังสือ/แหล่งอ้างอิงที่ใช้ในงานเขียน สร้างได้ด้วย <ol> (ลำดับ) หรือ <ul> ร่วมกับ <cite> สำหรับชื่อผลงาน

โครงสร้างแนะนำ

<ol class="bibliography">
  <li>
    <cite>Book Title</cite> by Author Name. Publisher, Year.
  </li>
  <li>
    <cite>Article Title</cite>. <cite>Journal Name</cite>, Volume(Issue), Pages. Year.
  </li>
</ol>

ตัวอย่าง

<!DOCTYPE html>
<html>
<head>
  <title>Bibliography</title>
  <style>
    .bibliography li { margin-bottom: 1rem; line-height: 1.6; }
    .bibliography cite { font-style: italic; }
  </style>
</head>
<body>
  <h1>Bibliography</h1>
  <ol class="bibliography">
    <li>
      E. Balagurusamy, <cite>Programming with JAVA: A Primer</cite>, 3rd edition, (2007)
    </li>
    <li>
      Reto Meier, <cite>Professional Android 4 Application Development</cite>, 3rd edition, (2012)
    </li>
  </ol>
</body>
</html>

รูปแบบ Citation Styles

StyleFormat
APAAuthor, A. A. (Year). Title. Publisher.
MLAAuthor, A. A. Title. Publisher, Year.
ChicagoAuthor, A. A. Title. City: Publisher, Year.
IEEE[1] A. A. Author, Title, Publisher, Year.

Semantic HTML5 เพิ่มเติม

  • <blockquote cite="..."> - สำหรับการอ้างอิงตรง
  • <figure> + <figcaption> - สำหรับรูป/ตารางที่อ้างอิง
  • <data value="..."> - machine-readable data

เครื่องมือช่วย

Zotero, Mendeley, EndNote - จัดการ reference และ export เป็น HTML/BibTeX