fe5-1:HTML知识

13次阅读

共计 761 个字符,预计需要花费 2 分钟才能阅读完成。

head 标签定义的东西不显示出来,样式、编码之类的 title 标签设置网站的页面文件的标题(网站名)meta 中 chaeset 用来声明网页编码 body 标签定义的为显示内容 input 标签用于定义输入框 br 相当于网页上的回车(换行)<!– 例子 –>: 这是 HTML 的注释
<!DOCTYPE html>
<html>
<head>
<meta charset=”utf-8″>
<title>Dome</title>
<style>
.radio-button {
display: inline-block;
padding: 10px;
cursor: pointer;
}
.active {
background: red;
}
</style>
</head>
<body>
<!– 注意, 每个标签都有 class 和 id 这两个属性 –>
<!– class 可以重复, id 不能重复 –>
<div class=login-form>
<input id=id-input-username type=”text” value=”mengxin”>
<br>
<input id=”id-input-password” type=”password” value=”mengxin”>
<br>
<button id=”id-button-login”> 登录按钮 </button>
</div>

<!– 这是一个选项卡的例子 –>
<div class=”radio-control”>
<!– 可以设置多个 class, 用空格分开 –>
<span class=”radio-button active”>html</span>
<span class=”radio-button”>js</span>
<span class=”radio-button”>css</span>
</div>
<!– –>
</body>
</html>

正文完
 0