前端HTML回顾

标签:定义HTML文档

标签:定义文档主体

从网站建设到定制行业解决方案,为提供成都网站建设、网站制作服务体系,各种行业企业客户提供网站建设解决方案,助力业务快速发展。创新互联将不断加快创新步伐,提供优质的建站服务。

-  标签:定义HTML标题


标签:创建水平线

 注释

标签:段落


标签:换行


HTML 链接

标签:链接

默认情况下,链接将以以下形式出现在浏览器中:

(1)href属性:来描述链接的地址

链接文本

(2)target 属性:定义被链接的文档在何处显示

例:target="_blank": 链接将在新窗口打开

(3)id属性:在一个HTML文档书签标记

例:插入ID   文字

文档中创建一个链接到ID部分  文字

创建一个链接到其它文档ID部分文字

注释: 请始终将正斜杠添加到子文件夹。

例:href="http://www.baidu.com/html/


HTML  元素

头部区域的元素标签为: , <style>, <meta>, <link>, <script>, <noscript>, and <base></p><p><title> 标签:定义了不同文档的标题</p><ul><li><p>定义了浏览器工具栏的标题</p></li><li><p>当网页添加到收藏夹时,显示在收藏夹中的标题</p></li><li><p>显示在搜索引擎结果页面的标题</p></li></ul><p><base> 标签:描述了基本的链接地址/链接目标,该标签作为HTML文档中所有的链接标签的默认链接:</p><pre><base href="http://www.baidu.com/p_w_picpaths/" target="_blank"></pre><p><link> 标签:链接到样式表(CSS)</p><pre><link rel="stylesheet" type="text/css" href="mystyle.css"></pre><p><style> 元素:直接添加CSS样式来渲染 HTML 文档</p><pre><head><style type="text/css">body {background-color:yellow}p {color:blue}</style></head></pre><p><meta> 标签:提供了元数据不显示在页面上,但会被浏览器解析。</p><p> 为搜索引擎定义关键词:</p><pre><meta name="keywords" content="HTML, CSS, XML, XHTML, JavaScript"></pre><p>为网页定义描述内容:</p><pre><meta name="description" content="免费 Web & 编程 教程"></pre><p>定义网页作者:</p><pre><meta name="author" content="Runoob"></pre><p>每30秒中刷新当前页面:</p><pre><meta http-equiv="refresh" content="30"></pre><p><script>标签:用于加载脚本文件,如: JavaScript</p><hr /><h3>HTML 图像- 图像标签( <img>)和源属性(Src)</h3><p><img> 是空标签,只包含属性,没有闭合标签。</p><pre><img src="url" alt="some_text"></pre><p>(1)src 属性: "source"源属性的值是图像的 URL 地址</p><p>(2)alt 属性:用来为图像定义一串预备的可替换的文本。</p><p>(3)height(高度) 与 width(宽度)属性:用于设置图像的高度与宽度。</p><hr /><h2>HTML 表格</h2><p><table> 标签:表格</p><p><tr> 标签:行</p><p><th> 标签:表头</p><p><td> 标签:单元格</p><p>colspan="2":链接行的两个段元格</p><p><img src="/upload/otherpic60/copycode.gif" alt="前端HTML回顾"></p><pre><table border="1">     <tr>         <th>Header 1</th>         <th>Header 2</th>     </tr>     <tr>         <td>row 1, cell 1</td>         <td>row 1, cell 2</td>     </tr>     <tr>         <td>row 2, cell 1</td>         <td>row 2, cell 2</td>     </tr></table></pre><p><img src="/upload/otherpic60/copycode.gif" alt="前端HTML回顾"></p><hr /><h2>HTML 列表</h2><p> <ul> 标签:无序列表</p><p> <ol> 标签:有序列表</p><p><li> 标签:每个列表项的开始</p><p><img src="/upload/otherpic60/copycode.gif" alt="前端HTML回顾"></p><pre><ul><li>Coffee</li><li>Milk</li></ul><ol><li>Coffee</li><li>Milk</li></ol></pre><p><img src="/upload/otherpic60/copycode.gif" alt="前端HTML回顾"></p><pre><dl>标签:自定义例表</pre><pre><dl><dt>自定义列表项</dt><dd>自定义列表项的定义<dd><dt>自定义列表项</dt><dd>自定义列表项的定义<dd></dl></pre><hr /><h3>HTML 区块</h3><p> <div> 元素:块级元素,可用于组合其他 HTML 元素的容器。</p><p> <span> 元素:内联元素,可用作文本的容器。</p><p> <table> 元素:作用是显示表格化的数据。</p><p>块级元素(block-level):在浏览器显示时,通常会以新行来开始(和结束)。例: <h2>, <p>, <ul>, <table></p><p>内联元素(inline):在显示时通常不会以新行开始。例: <b>, <td>, <a>, <img></p><hr /><h2>HTML 布局</h2><p><div>块级元素或是<table>表格化的数据</p><hr /><p> </p><h2>HTML 表单和输入</h2><p><form>标签:表单</p><p><input>标签:输入</p><p>文本域(Text Fields):缺省宽度是20个字符</p><pre><form>First name: <input type="text" name="firstname"><br>Last name: <input type="text" name="lastname"></form></pre><p>密码字段:<input type="password">——密码不会显示,以星号或圆点替代</p><pre><form>Password: <input type="password" name="pwd"></form></pre><p>单选按钮:<input type="radio"> </p><pre><form><input type="radio" name="sex" value="male">Male<br><input type="radio" name="sex" value="female">Female</form></pre><p>复选框:<input type="checkbox"></p><pre><form><input type="checkbox" name="vehicle" value="Bike">I have a bike<br><input type="checkbox" name="vehicle" value="Car">I have a car  </form></pre><p>提交按钮:<input type="submit"></p><pre><form name="input" action="html_form_action.php" method="get">Username: <input type="text" name="user"><input type="submit" value="Submit"></form></pre><hr /><h2>HTML 框架</h2><p><iframe>框架:在同一个浏览器窗口中显示不止一个页面。</p><p><strong>iframe语法:</strong><iframe src="<em>URL</em>"></iframe></p><p>height 和 width 属性:用来定义iframe标签的高度与宽度。——属性默认以像素为单位,</p><pre><iframe src="demo_iframe.htm" width="200" height="200"></iframe></pre><p>frameborder 属性:是否显示边框——属性值为 "0" 移除iframe的边框</p><pre><iframe src="demo_iframe.htm" frameborder="0"></iframe></pre><p>例:点击链接,链接地址页面显示在iframe框架中</p><pre><iframe src="demo_iframe.htm" name="iframe_a"></iframe><p><a href="http://www.baidu.com" target="iframe_a">baidu.com</a></p></pre><p>注:name和target名字相同。</p> <br> 新闻名称:前端HTML回顾 <br> 标题路径:<a href="http://myzitong.com/article/jcipih.html">http://myzitong.com/article/jcipih.html</a> </div> </div> <div class="contentr fr"> <h3>其他资讯</h3> <ul> <li> <a href="/article/dcipecs.html">sap系统无法打印机的简单介绍</a> </li><li> <a href="/article/dcipspi.html">路由器高度 路由器高度 信号 知乎</a> </li><li> <a href="/article/dcipsps.html">设置路由器网址 tplink设置路由器网址</a> </li><li> <a href="/article/dcipesc.html">php怎么更改数据 php修改sql语句</a> </li><li> <a href="/article/dcipeeh.html">linux休息命令 linux 取消休眠</a> </li> </ul> </div> </div> </div> <!--底部--> <footer> <div class="foot"> <div class="container"> <h1>梓潼大橙子建站您身边的网站制作服务商</h1> <div class="foot1"> <ul> <li> <dl><i class="iconfont"></i><b>地址ADDRESS</b></dl> <p>四川-成都青羊区太升南路288号<br> 锦天国际A座10楼 </p> </li> <li> <dl><i class="iconfont"></i><b>电话/TEL</b></dl> <p><a href="tel:02886922220" target="_blank">028 86922220</a> (工作日)<br> <a href="tel:18980820575" target="_blank">1898082 0575</a> ( 7x24 ) </p> </li> <li> <dl><i class="iconfont"></i><b>QQ咨询</b></dl> <p> 244261566 (售前)<br> 631063699 (售后) </p> </li> <li> <dl><i class="iconfont"></i><b>邮箱/E: mail</b></dl> <p> service@cdcxhl.com (业务)<br> hr@cdcxhl.com (求职) </p> </li> </ul> </div> <div class="link"> 友情链接: <a href="https://www.cdcxhl.com/sheji/chengdu.html" title="四川成都网站设计" target="_blank">四川成都网站设计</a>   <a href="http://www.cdxwcx.cn/tuoguan/sichuan.html" title="电信机房托管" target="_blank">电信机房托管</a>   <a href="http://chengdu.cdcxhl.com/dingzhi/" title="APP定制开发" target="_blank">APP定制开发</a>   <a href="http://www.cdkjz.cn/fangan/led/" title="LED网站设计方案" target="_blank">LED网站设计方案</a>   <a href="https://www.cdxwcx.com/tuiguang/ruanwen.html" title="软文推广" target="_blank">软文推广</a>   <a href="https://www.cdxwcx.com/city/qionglai/" title="邛崃网站建设" target="_blank">邛崃网站建设</a>   <a href="http://www.scjbgc.com/" title="四川搅拌罐车" target="_blank">四川搅拌罐车</a>   <a href="http://m.cdcxhl.com/" title="成都网站设计" target="_blank">成都网站设计</a>   <a href="http://chengdu.cdweb.net/weixinkaifa/qiyeweixin.html" title="企业微信定制" target="_blank">企业微信定制</a>   <a href="https://www.cdxwcx.com/" title="成都网站建设" target="_blank">成都网站建设</a>    </div> </div> </div> <div class="copy container"> Copyright