PROGRAMMING TUTORIAL

“Nerd life is so much better than regular life.” ~John Green

Tutorial HTML5 : Tag <a> — September 19, 2016
Tutorial HTML5 : Tag <figure> , <figcaption> —
Tutorial HTML5 : Tag <dd> , <dl> , <dt> —
Tutorial HTML5 : Tag <p> , <hr> , <pre> , <blockqoute> , <div> , <main> — September 18, 2016
Tutorial HTML5 : Tag <address> —
Tutorial HTML5 : Tag <footer> — September 17, 2016

Tutorial HTML5 : Tag <footer>

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;
}

 

Tutorial HTML5 : Tag <header> —

Tutorial HTML5 : Tag <header>

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;
}
Tutorial HTML5 : Tag <h1> , <h2> , <h3> , <h4> , <h5> dan <h6> —

Tutorial HTML5 : Tag <h1> , <h2> , <h3> , <h4> , <h5> dan <h6>

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;
}

 

Tutorial HTML5 : Tag <aside> —

Tutorial HTML5 : Tag <aside>

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;
}

 

Tutorial HTML5 : Tag <article> —

Tutorial HTML5 : Tag <article>

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;
}