记事本简单html静态网页模板
时间: 2023-07-27 09:06:04 浏览: 203
以下是一个简单的 HTML 静态网页模板,可以在记事本中编辑并保存为 .html 文件:
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>网页标题</title>
</head>
<body>
<header>
<h1>网页标题</h1>
</header>
<nav>
<ul>
<li><a href="#">导航链接1</a></li>
<li><a href="#">导航链接2</a></li>
<li><a href="#">导航链接3</a></li>
</ul>
</nav>
<main>
<h2>主要内容标题</h2>
<p>主要内容</p>
</main>
<footer>
<p>版权信息</p>
</footer>
</body>
</html>
```
在这个模板中,我们使用了 HTML5 的基本结构,包括 `<!DOCTYPE html>` 声明、`<html>` 元素、`<head>` 元素和 `charset` 属性等。在 `<head>` 元素中,我们设置了网页的标题。在 `<body>` 元素中,我们创建了一个简单的网页布局,包括页眉、导航、主要内容和页脚。你可以根据需要修改这个模板,添加更多的 HTML 元素和样式属性。
相关问题
记事本写html网页代码,生成网址
首先,打开记事本并输入以下代码:
```
<!DOCTYPE html>
<html>
<head>
<title>My First Website</title>
</head>
<body>
<h1>Welcome to my website!</h1>
<p>Here you will find all sorts of interesting things.</p>
<h2>My Favorite Things</h2>
<ul>
<li>Ice cream</li>
<li>Music</li>
<li>Movies</li>
</ul>
<h2>Contact Me</h2>
<p>You can reach me at <a href="mailto:youremail@example.com">youremail@example.com</a>.</p>
</body>
</html>
```
这是一个简单的 HTML 网页模板,包含了一些基本元素,如标题、段落、列表和超链接。你可以根据需要修改文本和添加其他元素。
然后,将文件保存为 `.html` 格式,例如 `mywebsite.html`。
最后,使用浏览器打开该文件,你将看到你自己的网站!如果你想将网站发布到网络上,你需要购买一个域名和主机,并将文件上传到主机上。
记事本实现html+css登录静态跳转页面
首先,你需要创建一个 HTML 文件,命名为 "login.html",然后添加以下代码:
```html
<!DOCTYPE html>
<html>
<head>
<title>Login Page</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container">
<h1>Login</h1>
<form>
<label for="username">Username:</label>
<input type="text" id="username" name="username" placeholder="Enter your username">
<label for="password">Password:</label>
<input type="password" id="password" name="password" placeholder="Enter your password">
<input type="submit" value="Login">
</form>
</div>
</body>
</html>
```
然后,你需要创建一个 CSS 文件,命名为 "style.css",然后添加以下代码:
```css
.container {
width: 400px;
margin: 0 auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
}
h1 {
text-align: center;
}
form {
display: flex;
flex-direction: column;
}
label {
margin-bottom: 10px;
}
input[type="text"],
input[type="password"] {
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}
input[type="submit"] {
padding: 10px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #3e8e41;
}
```
最后,你需要将这两个文件保存在同一个文件夹中,并用浏览器打开 "login.html" 文件就可以看到登录页面了。
阅读全文
相关推荐
















