网站首页 > 知识剖析 正文
html的书写基本格式及常见错误
html的标准书写方式如下:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>account statistics</title>
<meta name="keywords" content="account,statistics"/>
<meta name="description" content="this is account statistics"/>
<link type="image/x-icon" rel="shortcut icon" href="favicon.ico"/>
<link type="text/css" rel="stylesheet" href="./css/index.css"/>
<script type="text/javascript" src="./js/index.js"></script>
</head>
<body>
<div class="allcontent">
<div class="allc_title"><h1>account statistics</h1><span>there are xx data add data</span></div>
<div class="allc_content">
<table width="1000">
<tr>
<td>id</td>
<td>sort</td>
<td>categorize</td>
<td>website</td>
<td>account</td>
<td>password</td>
<td>remark</td>
<td>action options</td>
</tr>
<tr>
<td>id</td>
<td>sort</td>
<td>categorize</td>
<td>website</td>
<td>account</td>
<td>password</td>
<td>remark</td>
<td>revise | delete</td>
</tr>
</table>
</div>
</div>
</body>
</html>
其中用到的css代码如下:
body,html,ul,li,h1{margin:0;padding:0}
li{list-style:none}
table{border-collapse:collapse;}
th,td{border:1px solid black;text-align:center}
.allcontent{width:1024px;height:auto;margin:0px auto;background-color:red}
.allc_title{width:1024px;height:auto;font-size:24px; font-family:黑体;float:left;text-align:center}
.allc_title h1{font-size:24px;text-align:center;}
.allc_content{width:1024px; height:auto;float:left}
.allc_content ul{width:1024px;height:auto;float:left;border:1px solid black}
.allc_content ul li{width:auto;height:auto;float:left;margin:0px 10px;border-left:1px solid black}
在以上html中需要注意的几个常见问题,见图下:
如上图所示,看看自己的常见错误在哪里?
猜你喜欢
- 2024-12-17 HTML 元素与标签 html元素和标签
- 2024-12-17 HTML常用标签概述(可用于网店装修)
- 2024-12-17 高级搜索 绝不是点一下那么简单 高级搜索什么意思
- 2024-12-17 HTML中的标签 html中的标签区不区分大小写
- 2024-12-17 狗屁不通文章生成器网址入口 狗屁不通文章生成器链接
- 2024-12-17 HTML基本标记的使用方法 html的基本标记有哪些
- 2024-12-17 想要在 iPad 上标记网页?这款免费工具帮你高亮、批注、做笔记
- 2024-12-17 一个网站的TDK(标题、关键词、描述)的基本格式是什么?
- 2024-12-17 HTML的大脑:深入了解head标签的作用与特点
- 2024-12-17 HTML简单介绍及常见元素 html的常用元素
- 最近发表
- 标签列表
-
- xml (46)
- css animation (57)
- array_slice (60)
- htmlspecialchars (54)
- position: absolute (54)
- datediff函数 (47)
- array_pop (49)
- jsmap (52)
- toggleclass (43)
- console.time (63)
- .sql (41)
- ahref (40)
- js json.parse (59)
- html复选框 (60)
- css 透明 (44)
- css 颜色 (47)
- php replace (41)
- css nth-child (48)
- min-height (40)
- xml schema (44)
- css 最后一个元素 (46)
- location.origin (44)
- table border (49)
- html tr (40)
- video controls (49)