Contoh Script/Code HTML Beserta Hasil di Browser
Dalam membuat website HTML, ada beberapa standar yang harus di kita ikuti.Standar-standar berikut adalah;
1.Teks
Teks adalah kumpulan kalimat secara lisan/tulisan
Berikut ini lah kode tag tag yang untuk membuat sebuah table:
Tag <table>
Tag <thead>
Tag <tbody>
Tag <tfoot>
Tag <table> sebagai kontainer
Sedangkan tag <thead> sebagai tempat kita meletakkan nama kolom
Tag <tr> (table row)
Tag <td> (table data)
Tag <th> (table head)
Tag <Tbody> (table body)
Contoh script teks:
<h2>Contoh script teks</h2>
2.Tabel
Tabel adalah berbagai macam data yang disusun dalam kolom.
Contoh script tabel:
<table>
<tr>
<th>Contoh script tabel</th>
</tr>
<tr>
<td>1</td>
</tr>
<tr>
<td>2</td>
</tr>
</table>
3.Link
Link adalah bagian dari antarmuka yang bisa menghubungkan dengan tujuan atau target
Contoh script link:
<a href="https://www.w3schools.com/html/" title="Go to W3Schools HTML section">Visit our HTML Tutorial</a>
4.Form
Form adalah halaman yang berisi pertanyaan.
Contoh script form:
<form>
<label for="fname">Nama:</label><br>
<input type="text" id="fname" name="fname"><br>
<label for="lname">Nama lengkap:</label><br>
<input type="text" id="lname" name="lname">
</form>
5.Image/Gambar
Gambar adalah seni rupa dua dimensi.
Contoh script image:
<img src="img_chania.jpg" alt="Flowers in Chania">
6.Video
Video adalah teknologi pengiriman sinyal elektronik dari suatu gambar bergerak.
Contoh script video:
<video width="320" height="240" autoplay muted>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
Komentar
Posting Komentar