Html基础
-
基本结构
文档类型声明<!DCTYPE html> (不是标签)
头部信息
head
<!- -网页编码设置- ->
meta charset=“utf-8”
/head
主体信息
body/body
整个html
html/html -
语法:标签+属性
<标签名 属性名=“属性值”>
标签
块级标签- div
- 标题h1~h6
- 段落p
- Img标签img
(属性src, alt, height, width) - 超链接标签a
(属性href, target, title, name)- 锚链接name=“锚名1”
- 电子邮件链接
- 文件下载
- 列表标签
- 无序 ul li (type= disc, square, circle)
- 有序 ol li(type=1,a , A, i, l)
- 定义 dl>dt/dd
行级标签
span
b, em, img, input, a, sup, sub, textarea
其他标签
1. 预编译pre
2. 注释<!- -……- ->
3. br
4. hr
5. i em b strong sub sup
特殊符号
< > ® © ™
属性
Align属性: left, right, center, justify
color
bgcolor
font
表格table: html布局基础
- 基本语法
<table>
<caption></caption>
<thead>
<tr>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td><td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
-
属性
Table属性
Width, align, border, bgcolor, cellpadding, cellspacing, frame, rulestr属性
Align, valign, bgcolortd和th属性
Align, valign, bgcolor, width, height
行合并列合并colspan, rowspan
表单form 收集信息,人机交互
-
语法form action=“” method=“”/form
-
标签
纯文本label
表单控件
<input type=
Text
Password
Radio
Checkbox
Button
Submit
Reset
File
Hidden
列表框
select
outgroup label
option value
/select
多行文本域
textarea -
属性
Name Id Value Checked Selected Src Onclock Disabled Multiple
Css基础 .css
cascading style sheets 层叠样式列表
-
语法
内部
style type=“text/css”
P{属性}
/style
外部
link rel=“stylesheet” type=“text/css” href=“”
行内
p style=“属性” -
选择器
标签 p{}
类p class=“p1” p1{} -
属性
文本样式
Color
direction
letter-spacing
line-height
text-align
文本修饰
text-decoration
text-shadow
text-transform
Text-indent
Background包括
Background-color/position/repeat/attachment/image