Elemen <a> mendefinisikan hyperlink, yang digunakan untuk menghubungkan dari satu halaman ke halaman lain.
Category: Uncategorized
Elemen <figure> digunakan untuk membuat konten yang mandiri, seperti ilustrasi, diagram, foto, daftar kode, dll.
Elemen <figcaption> digunakan untuk membuat keterangan pada elemen <figure>.
Elemen <dd> digunakan untuk menjelaskan istilah/nama dalam daftar deskripsi.
Elemen <dl> mendefenisikan daftar deskripsi.
Elemen <dt> mendefinisikan istilah/nama dalam daftar deskripsi.
Elemen <p> digunakan untuk membuat paragraf.
Contoh:
<p>This is some text in a paragraph.</p>
Elemen <address> mendefinisikan informasi kontak untuk penulis/pemilik dokumen atau artikel. Jika elemen <address> berada dalam elemen <body> maka merupakan informasi kontak untuk dokumen. Jika elemen <address> berada dalam elemen <article> maka merupakan informasi kontak untuk artikel.
Elemen <footer> menentukan footer untuk dokumen. Sebuah footer biasanya berisi informasi penulis dokumen, hak cipta, link ke persyaratan penggunaan, informasi kontak, dll.
Contoh:
<!DOCTYPE html> <html> <body> <footer> <p>Posted by: Hege Refsnes</p> <p>Contact information: <a href="mailto:someone@example.com"> someone@example.com</a>.</p> </footer> </body> </html>
CSS Default Elemen <footer>
footer { display: block; }
Elemen <header> digunakan untuk pengantar konten atau set link navigasi.
Contoh:
<!DOCTYPE html> <html> <body> <article> <header> <h1>What Does WWF Do?</h1> <p>WWF's mission:</p> </header> <p>WWF's mission is to stop the degradation of our planet's natural environment, and build a future in which humans live in harmony with nature.</p> </article> </body> </html>
CSS Default Elemen <header>
header { display: block; }
Elemen <h1> , <h2> , <h3> , <h4> , <h5> dan <h6> digunakan untuk membuat judul dan subjudul.
Contoh:
<!DOCTYPE html> <html> <body> <h1>Let's call it a draw(ing surface)</h1> <h2>Diving in</h2> <h2>Simple shapes</h2> <h2>Canvas coordinates</h2> <h3>Canvas coordinates diagram</h3> <h2>Paths</h2> </body> </html>
CSS Default Elemen <h1>
h1 { display: block; font-size: 2em; margin-top: 0.67em; margin-bottom: 0.67em; margin-left: 0; margin-right: 0; font-weight: bold; }
CSS Default Elemen <h2>
h2 { display: block; font-size: 1.5em; margin-top: 0.83em; margin-bottom: 0.83em; margin-left: 0; margin-right: 0; font-weight: bold; }
CSS Default Elemen <h3>
h3 { display: block; font-size: 1.17em; margin-top: 1em; margin-bottom: 1em; margin-left: 0; margin-right: 0; font-weight: bold; }
CSS Default Elemen <h4>
h4 { display: block; margin-top: 1.33em; margin-bottom: 1.33em; margin-left: 0; margin-right: 0; font-weight: bold; }
CSS Default Elemen <h5>
h5 { display: block; font-size: .83em; margin-top: 1.67em; margin-bottom: 1.67em; margin-left: 0; margin-right: 0; font-weight: bold; }
CSS Default Elemen <h6>
h6 { display: block; font-size: .67em; margin-top: 2.33em; margin-bottom: 2.33em; margin-left: 0; margin-right: 0; font-weight: bold; }
Elemen <aside> digunakan untuk bagian yang terpisah dari konten utama seperti:
- Kutipan
- Sidebar
- Iklan
- Kutipan
- Grup Elemen nav
Contoh:
<!DOCTYPE html> <html> <body> <aside> <h1>Switzerland</h1> <p>Switzerland, a land-locked country in the middle of geographic Europe, has not joined the geopolitical European Union, though it is a signatory to a number of European treaties.</p> </aside> </body> </html>
CSS Default Elemen <aside>
aside { display: block; }
Elemen <article> digunakan untuk bagian konten yang independen seperti:
- forum post
- artikel majalah
- artikel surat kabar
- entri blog
- Komentar yang dikirim pengguna
Contoh penggunaan elemen <article> pada entri blog:
<!DOCTYPE html> <html> <body> <article> <header> <h1>The Very First Rule of Life</h1> <p><time pubdate datetime="2009-10-09T14:28-08:00"></time></p> </header> <p>If there's a microphone anywhere near you, assume it's hot and sending whatever you're saying to the world. Seriously.</p> <p>...</p> <footer> <a href="?comments=1">Show comments...</a> </footer> </article> </body> </html>
Contoh penggunaan elemen <article> pada komentar yang dikirim pengguna:
<!DOCTYPE html> <html> <body> <article> <header> <h1>The Very First Rule of Life</h1> <p><time pubdate datetime="2009-10-09T14:28-08:00"></time></p> </header> <p>If there's a microphone anywhere near you, assume it's hot and sending whatever you're saying to the world. Seriously.</p> <p>...</p> <section> <h1>Comments</h1> <article> <footer> <p>Posted by: George Washington</p> <p><time pubdate datetime="2009-10-10T19:10-08:00"></time></p> </footer> <p>Yeah! Especially when talking about your lobbyist friends!</p> </article> <article> <footer> <p>Posted by: George Hammond</p> <p><time pubdate datetime="2009-10-10T19:15-08:00"></time></p> </footer> <p>Hey, you have the same first name as me.</p> </article> </section> </article> </body> </html>
CSS Default Elemen <article>
article { display: block; }
Recent Comments