- 24 Nis 2024
- 41
- 2
- 8
Hazır kod bankası, yazılım geliştiricilerin ve yeni başlayanların kullanabileceği bir kaynak havuzudur. Bu banka, HTML, CSS, Excel, VBA, Visual Basic, PHP gibi farklı programlama dillerinde hazır kod örnekleri içerir. Bu makalede, farklı programlama dillerinde hazır kod örneklerine ve nasıl kullanılacaklarına dair bilgilere ulaşabilirsiniz.
HTML ve CSS Hazır Kod Örnekleri
HTML ve CSS Hazır Kod Örnekleri
- Basit Bir HTML Şablonu:
HTML:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <link rel="stylesheet" href="styles.css"> </head> <body> <header> <h1>Hoşgeldiniz!</h1> </header> <nav> <ul> <li><a href="#">Anasayfa</a></li> <li><a href="#">Hakkımızda</a></li> <li><a href="#">Hizmetlerimiz</a></li> <li><a href="#">İletişim</a></li> </ul> </nav> <section> <h2>Hakkımızda</h2> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> </section> <footer> <p>Telif Hakkı © 2024 Hazır Kod Bankası</p> </footer> </body> </html>
- CSS Basit Stil Dosyası (styles.css):
CSS:body { font-family: Arial, sans-serif; margin: 0; padding: 0; } header { background-color: #333; color: #fff; padding: 20px; text-align: center; } nav ul { list-style-type: none; padding: 0; background-color: #444; text-align: center; } nav ul li { display: inline; margin: 0 10px; } nav ul li a { text-decoration: none; color: #fff; } section { padding: 20px; } footer { background-color: #333; color: #fff; text-align: center; padding: 10px 0; position: fixed; bottom: 0; width: 100%; }
- Excel'de Toplama İşlemi:
Kod:vbaCopy code Sub Toplama() Dim sayi1 As Integer Dim sayi2 As Integer Dim toplam As Integer sayi1 = Range("A1").Value sayi2 = Range("A2").Value toplam = sayi1 + sayi2 Range("A3").Value = toplam End Sub
- Basit Bir Windows Form Uygulaması:
Kod:vbCopy code Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click MessageBox.Show("Merhaba, Dünya!") End Sub End Class
- PHP ile Basit Bir Form İşleme:
PHP:phpCopy code <!DOCTYPE html> <html> <body> <form action="form_isle.php" method="post"> Adınız: <input type="text" name="ad"><br> E-posta: <input type="text" name="email"><br> <input type="submit"> </form> </body> </html> phpCopy code <!DOCTYPE html> <html> <body> <?php $ad = $_POST["ad"]; $email = $_POST["email"]; echo "Merhaba, $ad! E-posta adresiniz: $email."; ?> </body> </html>