Daftar Tag HTML Lengkap dan Fungsinya

Created at by Aris Munandar

Tag HTML adalah elemen dasar yang digunakan untuk membuat struktur dan konten website. Memahami daftar tag HTML lengkap dan fungsinya sangat penting bagi setiap web developer.

Baca juga: Panduan Standar Penulisan HTML (Best Practice HTML5)

Apa itu Tag HTML?

Tag HTML adalah kode yang ditulis di antara tanda kurung sudut < dan >. Sebagian besar tag HTML dan fungsinya memiliki pasangan opening dan closing tag:

<tagname>Konten di sini</tagname>Code language: HTML, XML (xml)

Jenis-jenis Tag:

  1. Paired Tags – Memiliki opening dan closing tag
  2. Self-closing Tags – Tidak memerlukan closing tag
  3. Semantic Tags – Tag HTML5 dengan makna jelas

Tag Text Formatting

Fungsi tag HTML untuk formatting teks:

Bold dan Italic

<strong> – Bold Semantic

Fungsi: Teks tebal dengan emphasis penting

<p>Ini <strong>sangat penting</strong>!</p>Code language: HTML, XML (xml)

<b> – Bold Visual

Fungsi: Teks tebal tanpa emphasis khusus

<p>Ini <b>teks tebal</b></p>Code language: HTML, XML (xml)

<em> – Italic Semantic

Fungsi: Teks miring dengan emphasis

<p>Ini <em>perlu diperhatikan</em></p>Code language: HTML, XML (xml)

<i> – Italic Visual

Fungsi: Teks miring visual

<p>Ini <i>teks miring</i></p>Code language: HTML, XML (xml)

Text Decoration

<u> – Underline

Fungsi: Teks bergaris bawah

<p>Ini <u>teks underline</u></p>Code language: HTML, XML (xml)

<mark> – Highlight

Fungsi: Teks dengan background highlight

<p>Ini <mark>teks highlight</mark></p>Code language: HTML, XML (xml)

<del> – Deleted Text

Fungsi: Teks yang dihapus (strikethrough)

<p>Harga: <del>Rp 150.000</del> Rp 100.000</p>Code language: HTML, XML (xml)

<ins> – Inserted Text

Fungsi: Teks yang ditambahkan

<p>Total: <ins>Rp 100.000</ins></p>Code language: HTML, XML (xml)

Special Text

<sub> – Subscript

Fungsi: Teks subscript (di bawah)

<p>H<sub>2</sub>O</p>Code language: HTML, XML (xml)

<sup> – Superscript

Fungsi: Teks superscript (di atas)

<p>E = mc<sup>2</sup></p>Code language: HTML, XML (xml)

<small> – Small Text

Fungsi: Teks lebih kecil

<p>Harga <small>(belum termasuk pajak)</small></p>Code language: HTML, XML (xml)

<code> – Code

Fungsi: Menampilkan kode inline

<p>Gunakan tag <code>&lt;div&gt;</code></p>Code language: HTML, XML (xml)

<pre> – Preformatted

Fungsi: Teks dengan format asli (spasi dipertahankan)

<pre>
function hello() {
    console.log("Hello");
}
</pre>Code language: JavaScript (javascript)

<blockquote> – Block Quote

Fungsi: Kutipan blok

<blockquote>
    <p>Ini adalah kutipan panjang.</p>
</blockquote>Code language: HTML, XML (xml)

<q> – Inline Quote

Fungsi: Kutipan inline

<p>Kata pepatah, <q>Belajar adalah investasi</q>.</p>Code language: HTML, XML (xml)

<abbr> – Abbreviation

Fungsi: Singkatan atau akronim

<p><abbr title="HyperText Markup Language">HTML</abbr></p>Code language: HTML, XML (xml)

Tag List

Tag HTML5 lengkap untuk membuat list:

<ul> – Unordered List

Fungsi: List tanpa nomor (bullet points)

<ul>
    <li>Item pertama</li>
    <li>Item kedua</li>
    <li>Item ketiga</li>
</ul>Code language: HTML, XML (xml)

<ol> – Ordered List

Fungsi: List dengan nomor urut

<ol>
    <li>Langkah 1</li>
    <li>Langkah 2</li>
    <li>Langkah 3</li>
</ol>Code language: HTML, XML (xml)

Atribut:

  • type – Jenis nomor (1, A, a, I, i)
  • start – Nomor awal
  • reversed – Urutan terbalik

<li> – List Item

Fungsi: Item dalam list

<dl> – Description List

Fungsi: List deskripsi (term dan definisi)

<dl>
    <dt>HTML</dt>
    <dd>HyperText Markup Language</dd>
    
    <dt>CSS</dt>
    <dd>Cascading Style Sheets</dd>
</dl>Code language: HTML, XML (xml)

<dt> – Description Term

Fungsi: Term/istilah

<dd> – Description Definition

Fungsi: Definisi term

Tag Table

Tag HTML dan fungsinya untuk tabel:

Basic Table

<table> – Table

Fungsi: Membuat tabel

<tr> – Table Row

Fungsi: Baris tabel

<th> – Table Header

Fungsi: Cell header (tebal, center)

<td> – Table Data

Fungsi: Cell data

<table border="1">
    <tr>
        <th>Nama</th>
        <th>Umur</th>
    </tr>
    <tr>
        <td>John</td>
        <td>25</td>
    </tr>
    <tr>
        <td>Jane</td>
        <td>23</td>
    </tr>
</table>Code language: HTML, XML (xml)

Advanced Table

<thead> – Table Head

Fungsi: Mengelompokkan header

<tbody> – Table Body

Fungsi: Mengelompokkan body

Fungsi: Mengelompokkan footer

<caption> – Table Caption

Fungsi: Judul tabel

<table>
    <caption>Daftar Siswa</caption>
    <thead>
        <tr>
            <th>No</th>
            <th>Nama</th>
            <th>Nilai</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>1</td>
            <td>Ahmad</td>
            <td>85</td>
        </tr>
    </tbody>
    <tfoot>
        <tr>
            <td colspan="2">Rata-rata</td>
            <td>85</td>
        </tr>
    </tfoot>
</table>Code language: HTML, XML (xml)

Atribut:

  • colspan – Gabung kolom
  • rowspan – Gabung baris

Tag HTML5 Semantic

Tag HTML5 lengkap yang semantic:

<header> – Header

Fungsi: Header section

<header>
    <h1>Logo Website</h1>
    <nav><!-- Navigation --></nav>
</header>Code language: HTML, XML (xml)

Fungsi: Navigation menu

<nav>
    <ul>
        <li><a href="#home">Home</a></li>
        <li><a href="#about">About</a></li>
    </ul>
</nav>Code language: HTML, XML (xml)

<main> – Main

Fungsi: Konten utama (hanya 1x per halaman)

<main>
    <article><!-- Main content --></article>
</main>Code language: HTML, XML (xml)

<article> – Article

Fungsi: Konten independen (blog, berita)

<article>
    <h2>Judul Artikel</h2>
    <p>Konten artikel...</p>
</article>Code language: HTML, XML (xml)

<section> – Section

Fungsi: Section konten dengan heading

<section>
    <h2>Tentang Kami</h2>
    <p>Informasi...</p>
</section>Code language: HTML, XML (xml)

<aside> – Aside

Fungsi: Konten sampingan (sidebar)

<aside>
    <h3>Artikel Terkait</h3>
    <ul>
        <li><a href="#">Artikel 1</a></li>
    </ul>
</aside>Code language: HTML, XML (xml)

Fungsi: Footer section

<footer>
    <p>&copy; 2024 Website</p>
</footer>Code language: HTML, XML (xml)

<details> – Details

Fungsi: Konten expand/collapse

<details>
    <summary>Klik untuk detail</summary>
    <p>Konten detail...</p>
</details>Code language: HTML, XML (xml)

<summary> – Summary

Fungsi: Judul untuk details

<time> – Time

Fungsi: Tanggal/waktu

<time datetime="2024-01-15">15 Januari 2024</time>Code language: HTML, XML (xml)

<address> – Address

Fungsi: Informasi kontak

<address>
    Email: <a href="mailto:info@example.com">info@example.com</a>
</address>Code language: HTML, XML (xml)

Tabel Referensi Lengkap

Kategori Tag HTML

KategoriTag UtamaFungsi
Document<!DOCTYPE>, <html>, <head>, <body>Struktur dasar
Metadata<meta>, <title>, <link>, <style>Informasi dokumen
Text<p>, <h1>-<h6>, <strong>, <em>Format teks
List<ul>, <ol>, <li>, <dl>Daftar
Link/Media<a>, <img>, <audio>, <video>Link dan media
Table<table>, <tr>, <th>, <td>Tabel
Form<form>, <input>, <select>, <button>Form input
Semantic<header>, <nav>, <main>, <footer>Struktur semantic

Tag Berdasarkan Prioritas

Tag Wajib (Must Know):

  • <!DOCTYPE html>, <html>, <head>, <body>, <title>
  • <h1>-<h6>, <p>, <div>, <span>
  • <a>, <img>
  • <ul>, <ol>, <li>

Tag Penting (Should Know):

  • <meta>, <link>, <style>, <script>
  • <strong>, <em>, <br>, <hr>
  • <table>, <tr>, <th>, <td>
  • <form>, <input>, <button>, <label>

Tag HTML5 Semantic (Good to Know):

  • <header>, <nav>, <main>, <article>
  • <section>, <aside>, <footer>
  • <figure>, <figcaption>, <time>

Kesimpulan

Memahami daftar tag HTML lengkap dan fungsinya adalah fondasi penting dalam web development. Dengan menguasai tag HTML dan fungsinya, Anda dapat:

  1. Membuat Struktur Website – Menggunakan tag dasar HTML dengan benar
  2. Format Konten – Menggunakan tag text formatting untuk readability
  3. Semantic Markup – Menggunakan tag HTML5 semantic untuk SEO
  4. Form Interaktif – Membuat form input yang user-friendly
  5. Media Rich – Menampilkan gambar, audio, dan video

Tips Belajar Tag HTML:

  • Mulai dari tag dasar HTML (<html>, <head>, <body>)
  • Praktik dengan tag HTML penting (heading, paragraf, link, gambar)
  • Pelajari tag HTML5 lengkap untuk semantic markup
  • Gunakan semua tag HTML dan kegunaannya sesuai kebutuhan
  • Validasi kode dengan W3C Validator

Dengan memahami fungsi tag HTML secara lengkap, Anda siap membuat website yang terstruktur, semantic, dan SEO-friendly!

1 HTML Dasar (Pemula)

2 HTML Menengah

3 HTML Lanjutan

4 HTML Mahir

Comments

Congrats, you have the opportunity to be the first commenter on this article. Have questions or suggestions? Please leave a comment to start discussion.

Leave comment

Alamat email Anda tidak akan dipublikasikan. Required fields are marked *

news-1701

sabung ayam online

yakinjp

yakinjp

rtp yakinjp

slot thailand

yakinjp

yakinjp

yakin jp

yakinjp id

maujp

maujp

maujp

maujp

sabung ayam online

sabung ayam online

judi bola online

sabung ayam online

judi bola online

slot mahjong ways

slot mahjong

sabung ayam online

judi bola

live casino

sabung ayam online

judi bola

live casino

SGP Pools

slot mahjong

sabung ayam online

slot mahjong

SLOT THAILAND

138000491

138000492

138000493

138000494

138000495

138000496

138000497

138000498

138000499

138000500

138000501

138000502

138000503

138000504

138000505

138000506

138000507

138000508

138000509

138000510

138000511

138000512

138000513

138000514

138000515

138000516

138000517

138000518

138000519

138000520

138000521

138000522

138000523

138000524

138000525

article 138000526

article 138000527

article 138000528

article 138000529

article 138000530

article 138000531

article 138000532

article 138000533

article 138000534

article 138000535

article 138000536

article 138000537

article 138000538

article 138000539

article 138000540

article 138000541

article 138000542

article 138000543

article 138000544

article 138000545

article 138000546

article 138000547

article 138000548

article 138000549

article 138000550

article 138000551

article 138000552

article 138000553

article 138000554

article 138000555

158000396

158000397

158000398

158000399

158000400

158000401

158000402

158000403

158000404

158000405

158000406

158000407

158000408

158000409

158000410

158000411

158000412

158000413

158000414

158000415

article 158000416

article 158000417

article 158000418

article 158000419

article 158000420

article 158000421

article 158000422

article 158000423

article 158000424

article 158000425

article 158000426

article 158000427

article 158000428

article 158000429

article 158000430

article 158000431

article 158000432

article 158000433

article 158000434

article 158000435

208000411

208000412

208000413

208000414

208000415

208000416

208000417

208000418

208000419

208000420

208000421

208000422

208000423

208000424

208000425

208000426

208000427

208000428

208000429

208000430

208000431

208000432

208000433

208000434

208000435

article 208000436

article 208000437

article 208000438

article 208000439

article 208000440

article 208000441

article 208000442

article 208000443

article 208000444

article 208000445

article 208000446

article 208000447

article 208000448

article 208000449

article 208000450

article 208000451

article 208000452

article 208000453

article 208000454

article 208000455

article 208000456

article 208000457

article 208000458

article 208000459

article 208000460

article 208000461

article 208000462

article 208000463

article 208000464

article 208000465

208000436

208000437

208000438

208000439

208000440

208000441

208000442

208000443

208000444

208000445

208000446

208000447

208000448

208000449

208000450

208000451

208000452

208000453

208000454

208000455

228000271

228000272

228000273

228000274

228000275

228000276

228000277

228000278

228000279

228000280

228000281

228000282

228000283

228000284

228000285

article 228000286

article 228000287

article 228000288

article 228000289

article 228000290

article 228000291

article 228000292

article 228000293

article 228000294

article 228000295

article 228000296

article 228000297

article 228000298

article 228000299

article 228000300

article 228000301

article 228000302

article 228000303

article 228000304

article 228000305

article 228000306

article 228000307

article 228000308

article 228000309

article 228000310

article 228000311

article 228000312

article 228000313

article 228000314

article 228000315

238000241

238000242

238000243

238000244

238000245

238000246

238000247

238000248

238000249

238000250

238000251

238000252

238000254

238000255

238000256

238000257

238000258

238000259

238000260

article 238000261

article 238000262

article 238000263

article 238000264

article 238000265

article 238000266

article 238000267

article 238000268

article 238000269

article 238000270

article 238000271

article 238000272

article 238000273

article 238000274

article 238000275

article 238000276

article 238000277

article 238000278

article 238000279

article 238000280

news-1701