Here is an example of HTML and CSS code for a simple single-page website with multiple DIVs for different sections:
HTML:
<!DOCTYPE html> <html> <head> <title>Single Page DIV Website</title> <link rel="stylesheet" type="text/css" href="styles.css"> </head> <body> <div class="header"> <h1>Header</h1> </div> <div class="about"> <h2>About</h2> <p>This is some information about the website.</p> </div> <div class="services"> <h2>Services</h2> <ul> <li>Service 1</li> <li>Service 2</li> <li>Service 3</li> </ul> </div> <div class="footer"> <p>Copyright © 2021</p> </div> </body> </html>
CSS:
.header {
background-color: #eee;
text-align: center;
padding: 20px;
}
.about {
background-color: #ddd;
padding: 20px;
}
.services {
background-color: #ccc;
padding: 20px;
}
.footer {
background-color: #aaa;
text-align: center;
padding: 10px;
}
No comments:
Post a Comment