web前端 html基础

web服务本质:socket套接字
html:超文本标记语言,通过标签语言来标记要显示的网页中的各个部分
html不是编程语言

html结构
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>

块级标签:另起新一行的标签
内联标签:不起新行的标签

<!DOCTYPE html> html5标准页面声明


<head>内常用标签
<meta name="keywords" content="keyword,keyword,keyword">
<meta http-equiv="Refresh" content="2,URL=http://">

<title>oldboy</title>

<link rel="icon" href="http://www.jd.com/favicon.ico">
</head>

<body>
基本标签
<hn></hn>  标题
<p></p>  段落
<b></b>  加粗
<strike></strike>  文字上加横线
<em></em>  斜体
<sup></sup>  上标下标
<br>  换行
<hr>  水平线
&nbsp

为CSS样式而生的
<div></div> 块级标签
<span></span> 内联级

图形标签
  <img src="" 要显示图片的路径
alt="" 图片没有加载成功时的提示
title="" 鼠标悬浮时的提示信息
width="" 图片的宽
height="" 图片的高
>
超链接标签
<a href="超链接地址" target="_blank"(新的页面)>点击这里</a>

列表标签
<ul> 无序列表
<li></li>
<li></li>
<li></li>
</ul>
<ol> 有序列表
<li></li>
<li></li>
<li></li>
</ol>
<dl> 定义列表
<dt></dt>
<dt></dt>
<dt></dt>
</dl>

表格标签
<table border="1"(边框,粗细) type="border-color:red"(边框颜色) cellspacing="1"(外边框) cellpadding="1"(内边框)>
<tr>
<th></th>  标题,加粗的
<th></th>
<th></th>
</tr>
<tr>
<td></td>  普通列内容
<td></td>
<td></td>
</tr>
</table>


原文地址:https://www.cnblogs.com/lucaq/p/7265124.html