Saatnya mengotori tangan Anda dan menulis file HTML pertama Anda. Mari kita mulai dengan membuka program pengeditan teks. Jika Anda menggunakan PC Microsoft Windows, buka program bernama Notepad (lihat di Start Menu Anda untuk itu, atau cukup tahan Tombol Windows di keyboard Anda dan tekan R, lalu ketik "notepad" ke dalam run command prompt dan tekan enter). Jika Anda menggunakan komputer Macintosh, luncurkan aplikasi bernama "TextEdit" (yang dapat ditemukan di folder Aplikasi Anda) Show
Sebagai pembuat kode, adalah tugas kami untuk mengubah kanvas kosong dokumen ini menjadi mahakarya HTML. Mari kita mulai dengan memasukkan kode berikut ke dalam dokumen teks kosong kita, (atau gunakan fungsi salin dan tempel komputer Anda dan angkat langsung dari bawah) <!DOCTYPE html> Kode ini memberi tahu browser web bahasa komputer apa yang kita gunakan (HTML). Anda akan memulai setiap halaman web yang pernah Anda buat dengan kode ini Menulis HTML Seperti Membuat SandwichKami sekarang siap untuk memulai struktur halaman kami yang sebenarnya. Mulailah dengan menambahkan kode berikut ke dokumen Anda, tepat di bawah kode terakhir kita <html> </html>_ The start-tag tells the web browser that we want to begin our document; similarly the end-tag tells the browser we want to end our document. If our page is a sandwich, the start and end tags are the slabs of bread. Before we can add any exciting content to our page, there is one more element we must add. Insert the following code directly beneath the start tag: <body> </body> The element signifies the portion of our document that will house our actual content (paragraphs, images, etc…). You may be thinking “But I thought that’s what the tags did?” In fact, the element houses everything, both our actual content (which goes inside the element) and more complex elements that we will learn about in future lessons. For now, just know that the element goes inside the element.Seperti inilah tampilan dokumen Anda sejauh ini <!DOCTYPE html> <html> <body> </body> </html> Akhirnya, Bagian MenyenangkanSekarang, mari tambahkan sedikit konten pertama kita ke halaman kita. Bagaimana dengan heading tebal yang besar? <h1>This is a big bold heading</h1>_ Kode ini menimbulkan pertanyaan bagus untuk pembuat kode pemula. “Bagaimana saya bisa tahu elemen apa yang digunakan? We decided to use the element to describe our heading because this is the most important (and only) heading on our page. In future lessons we will create pages with multiple headings and utilize , and tags to create a hierarchy of importance for our content.Boneka Susun Rusia |