Membuat halaman statis codeeighter

Auliya
3 Views
Tentu! Berikut adalah contoh kode untuk membuat halaman statis sederhana menggunakan HTML dan CSS untuk CodeEighter: html Copy code <!DOCTYPE html> <html> <head> <title>CodeEighter</title> <link rel="stylesheet" type="text/css" href="styles.css"> </head> <body> <header> <h1>Welcome to CodeEighter</h1> </header> <nav> <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Services</a></li> <li><a href="#">Contact</a></li> </ul> </nav> <section> <h2>About Us</h2> <p>CodeEighter is a leading provider of coding solutions...</p> </section> <section> <h2>Our Services</h2> <ul> <li>Web Development</li> <li>Mobile App Development</li> <li>UI/UX Design</li> </ul> </section> <footer> <p>© 2023 CodeEighter. All rights reserved.</p> </footer> </body> </html> Anda juga perlu membuat file styles.css dalam folder yang sama dengan kode HTML di atas untuk menerapkan gaya halaman Anda. Berikut adalah contoh sederhana untuk styles.css: css Copy code body { font-family: Arial, sans-serif; margin: 0; padding: 0; } header { background-color: #333; color: #fff; padding: 20px; } nav { background-color: #555; padding: 10px; } nav ul { list-style-type: none; margin: 0; padding: 0; } nav ul li { display: inline; margin-right: 10px; } nav ul li a { color: #fff; text-decoration: none; } section { margin: 20px; } footer { background-color: #333; color: #fff; padding: 10px; text-align: center; } Pastikan kedua file (index.html dan styles.css) berada dalam folder yang sama. Anda dapat mengganti konten dan gaya sesuai dengan kebutuhan Anda.

Comments