html页面代码

Certainly! Below is a simple HTML page code:

html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Simple HTML Page</title> <style> body { font-family: Arial, sans-serif; background-color: #f0f0f0; margin: 0; padding: 0; } .container { width: 80%; margin: 0 auto; padding: 20px; background-color: #fff; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); margin-top: 50px; } h1 { color: #333; } p { color: #666; line-height: 1.6; } </style> </head> <body> <div class="container"> <h1>Welcome to My Simple HTML Page</h1> <p>This is a basic HTML page created for demonstration purposes.</p> <p>You can modify and enhance it according to your needs.</p> </div> </body> </html>

This code creates a simple HTML page with a title, some basic styling, and a container that holds a heading and a couple of paragraphs. You can customize and expand upon it as needed.

Certainly! Here's an extended version of the HTML page with additional elements:

html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Extended HTML Page</title> <style> body { font-family: Arial, sans-serif; background-color: #f0f0f0; margin: 0; padding: 0; } .container { width: 80%; margin: 0 auto; padding: 20px; background-color: #fff; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); margin-top: 50px; } h1 { color: #333; } p { color: #666; line-height: 1.6; } ul { list-style-type: square; color: #333; } li { margin-bottom: 5px; } </style> </head> <body> <div class="container"> <h1>Welcome to My Extended HTML Page</h1> <p>This is an extended version of the basic HTML page with additional elements:</p> <ul> <li>Links</li> <li>Images</li> <li>Tables</li> <li>Forms</li> </ul> <p>You can modify and enhance it according to your needs.</p> <h2>Links</h2> <p>Here's a link to <a href="https://www.example.com">Example.com</a>.</p> <h2>Images</h2> <p>Below is an image:</p> <img src="https://via.placeholder.com/150" alt="Placeholder Image"> <h2>Tables</h2> <table border="1"> <tr> <th>Name</th> <th>Age</th> </tr> <tr> <td>John</td> <td>30</td> </tr> <tr> <td>Jane</td> <td>25</td> </tr> </table> <h2>Forms</h2> <form> <label for="name">Name:</label><br> <input type="text" id="name" name="name"><br> <label for="email">Email:</label><br> <input type="email" id="email" name="email"><br> <input type="submit" value="Submit"> </form> </div> </body> </html>

This version extends the basic HTML page with additional elements such as links, images, tables, and forms. You can further customize and expand it according to your requirements.