界面HTML基础

本文详细介绍了HTML的基本结构与常用标签,包括格式化文本、链接、列表等,并深入探讨了块级元素与内联元素的区别及应用。

1. <!-- [endif]-->HTML

<!-- [if !supportLists]-->一、 <!-- [endif]-->基本结构

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"

"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html>

<html>

<head>

<title></title>

</head>

<body>

</body>

</html>

<!-- [if !supportLists]-->二、 <!-- [endif]-->基本概念

<!-- [if !supportLists]-->1) <!-- [endif]-->标签 tag

<!-- [if !supportLists]-->1. <!-- [endif]-->开始标签 <div id="layer1">

<!-- [if !supportLists]-->2. <!-- [endif]-->结束标签 </div>

<!-- [if !supportLists]-->3. <!-- [endif]-->空标签 换行 <br /> 水平线 <hr /> 图像 <img src=”” />

<!-- [if !supportLists]-->4. <!-- [endif]-->空格 &nbsp

<!-- [if !supportLists]-->2) <!-- [endif]-->属性 attribute

<!-- [if !supportLists]-->3) <!-- [endif]-->元素 element = <div id="layer1">......</div>

<!-- [if !supportLists]-->三、 <!-- [endif]-->主要标签(笔记)

<!-- [if !supportLists]-->1) <!-- [endif]-->有关格式的

<!-- [if !supportLists]-->1. <!-- [endif]--><p>...</p> :段落

<!-- [if !supportLists]-->2. <!-- [endif]--><br /> :段内换行

<!-- [if !supportLists]-->3. <!-- [endif]--><h1>...</h1> :标题,公分 6 级, h1~h6

<!-- [if !supportLists]-->2) <!-- [endif]-->链接 <a>...</a>

<!-- [if !supportLists]-->3) <!-- [endif]-->列表

<!-- [if !supportLists]-->1. <!-- [endif]--><ul></ul> 无须列表 <li></li> 列表项

<!-- [if !supportLists]-->2. <!-- [endif]--><ol></ol> 有序列表

<!-- [if !supportLists]-->4) <!-- [endif]-->表格

<!-- [if !supportLists]-->1. <!-- [endif]--><table></table> 列表

<!-- [if !supportLists]-->2. <!-- [endif]--><tr /> 列表行

<!-- [if !supportLists]-->3. <!-- [endif]--><td /> 列表格

<!-- [if !supportLists]-->5) <!-- [endif]-->表单

<!-- [if !supportLists]-->1. <!-- [endif]--><form action="" method="">

<!-- [if !supportLists]-->2. <!-- [endif]--><lable>dsadasd</lable>

<!-- [if !supportLists]-->3. <!-- [endif]--><input type="text" /> password

<!-- [if !supportLists]-->四、 <!-- [endif]-->主要标签(块级元素换行 内联元素不换行)

<!-- [if !supportLists]-->1) <!-- [endif]-->标记文本

标题: h1h2h3h4h5h6

段落: p

长引用:(使所有首行缩进表示引用的文本) blockquote

短引用: q 如同长引用

预格式文本:(保持编辑时的格式显示在网页上) pre

各种列元素: <ol start=””>: 值填几表示从几开始、 ullidldtdd dl 如同 uloldt 用来描述 dl 列表项的意义, dl 如同 li 属性 list-style 可设置无须列表

水平线: hr

<!-- [if !supportLists]-->2) <!-- [endif]-->表意内联元素

强调文本: em 斜体 strong 粗体

简写: <abbr title=””>….</abbr>title 里是全写 标签包含为缩写 浏览器能显示

缩写: <acronym title=””> 同简写

<!-- [if !supportLists]-->3) <!-- [endif]-->泛型元素

Div span span 不换行可以定义在内联元素内

<!-- [if !supportLists]-->4) <!-- [endif]-->链接

<a href=”” target= “” ></a> a 属于内联元素 target 属性表示是否把链接显示在新窗口中“”起任意没有 _ 开头的名字

网页链接为 http:// 邮件链接为 mailto

<!-- [if !supportLists]-->5) <!-- [endif]-->加入图片

<Img /> src 属性:选择图片地址 alt 属性描述图片属性

<!-- [if !supportLists]-->6) <!-- [endif]-->表格

表: table
表标题: caption 位于 table 内 摘要 summary 为摘要属性一般不显示。

表行: tr

表头: th 属性 headerstd 绑定到第一个 th

表格信息: td

合并属性: colspanrowspan= “”它的值表示合并几列(行)

<!-- [if !supportLists]-->7) <!-- [endif]-->表单

表单容器: form 位于表单最外层

<form action=”” method=”post”>action 的值发送到服务器的脚本中

标签: <label for=” 指定描述对象的 ID ”> <input type=”” name=”” id=”ID ”> 使得标签与对象对应

表单中的字段集: <fieldset> <legend> 为字段集添加标题,位于 fieldset 内部

文本输入控件: a 单行文本输入域: <input type=”text” />

属性: value= “”在输入域中默认显示的文本

Size= “”设置输入域中字符宽度。默认值是 20 个字符

Maxlength :带有滚动条的输入域 字符不限

b 密码输入域: <input type=”password” />

c 多行文本输入控件: <textarea name=”” rows=”” cols=””> 了解

提交和重设按钮: <input type=”submit”> <input type=”reset” />

属性 value 按钮上的文字

自定义输入按钮: <input type=”button”> 可作为 script 调用 属性同上

单选按钮和复选框: <input type=”radio” /> <input type=”checkbox” />

菜单: <select> 为定义菜单 <option> 为菜单选项 <optgroup> 为菜单项分组

文件选择控件: <input type=”file” />

 

 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值