26 Apr 2020
1426字
5分
次
wiki
CC BY 4.0
(除特别声明或转载文章外)
HTML
<!DOCTYPE html>
<html>
<head>
<title>My First Webpage</title>
<meta charset="UTF-8">
<meta name="description"
content="This field contains information about your page. It is usually around two sentences long.">
<meta name="author" content="Conor Sheils">
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<!-- <style>
#para1 {
text-align: center;
color: red;
}
p {
text-align: left;
color: white;
}
.center {
text-align: center;
color: royalblue;
}
</style> -->
<body>
<h1 class="center">Welcome to My Page</h1>
<p id="para1">para1</p>
<p>Welcome to <em>my</em> brand new website. This site will be my <strong>new<strong> home on the web.</p>
<p><a href="https://html.com/"> Page</a></p>
<p><img src="55222834.jpg" alt="This is a test image" height="42" width="42"></p>
<p>This website will have the following benefits for my business:</p>
<ul>
<li>Increased traffic </li>
<li>Global Reach</li>
<li>Promotional Opportunities</li>
</ul>
<button type="button" onclick="alert('You pressed the button!')">Click me!</button>
</body>
</html>
CSS
- 所有关键网站内容都应使用标记语言(如 HTML)添加到网站。
- 不属于网页演示文稿的博客文章、页面标题、视频、音频和图片
- 网站内容的呈现应由样式语言(如 CSS)定义。
- 背景图像和颜色,边框,字体大小,排版以及网页上项目的位置快递
#para1 {
text-align: center;
color: red;
}
p {
text-align: left;
color: white;
}
.center {
text-align: center;
color: royalblue;
}