html(2)

xiaoxiao2021-02-28  103

一、<table></table>标签: <table border=”1px” cellpadding=”5px” cellspacing=”4px”> </table>,cellpadding:里面的内容距离上面和左边的间距, spacing(间隔) Cellspacing:边框和边框之间的间距。 更改一个标签的外观一般不用属性去做,用css样式做。 二、<body></body>里面的<th></th>:默认粗体居中。 <body> <table border=”1px” cellpadding=”1px” cellspacing=”0px”> <tr><th>姓名</th><th>学号</th><th>年龄</th></tr> <tr><td colspan=”2”>张三</td><td>21</td></tr> <tr><td>张三</td><td>002</td><td>21</td></tr> <tr><td>张三</td><td rowspan=”2”>003</td><td>21</td></tr> <tr><td>张三</td><td>21</td></tr> </table> </body> span(跨度) <td colspan=”3”></td>:跨列 <td rowspan=”3”></td>:跨行。 注意:跨行跨列必须要写在html里面,他没办法用css写。 三、<caption align=”bottom”>学生信息表</caption> 四、<img src=”img/logo.jpgwidth=”100px” height=”100px” border=”1px” alt=”未找到图片”> Alt=”未找到图片” 用户体验很好。 绝对路径:是从盘符开始的路径, 形如C:\windows\system32\cmd.exe 相对路径:是从当前路径开始的路径,如当前路径为C:\windows 要描述上述路径,只需输入入system32\cmd.exe 。 直接点击html页面是在本地运行,在本地解析 输入网址运行html,网站是运行在一个叫做IIS的软件里面。 <img src=”../img/logo.jpg”/>这样写在本地和服务器端都能运行 ../表示找上一级,../../表示找上上一级。 <img src=/img/logo.jpg”/> /表示网站的根目录,这样只在服务器端能运行。 五、<a href=”http://www.baidu.comtarget=”_blank”>百度</a>, 其中target=”_blank”是写在html里面的。 空链接:<a href=”javascript:;” target=”_blank”>百度</a> 六、<form action=”xxx.aspx” method=”get”>get提交和post提交。 Get提交提交id,类型等小数据,Post提交密码,身份证等。 <input type=”button” value=”我是一个普通的按钮”/> <input type=”text”> <input type=”password”> <select multiple=”multiple”> <option>--请选择--</option> <option>你好</option> <option>你好</option> </select> <input type=”radio” name=”sex”/><input type=”radio” name=”sex”/>女 Name设置成一样的话就只能选一个 怎样设置成点击标签的时候就选中呢? <input type="radio" name="sex" id="male"/><label for="male"></label> <input type="radio" name="sex" id="female"/> <label for="female"></label> <input type=”checkbox” id=”apple”><label for=”apple”> 苹果</label> <input type=”checkbox” id=”orange”></label for=”orange”> 橘子</label> <input type=”reset” value=”重置”/> <input type=”submit” value=”提交”/> <textarea cols=”10” rows=”3” style="resize:none"></textarea> field(田地),legend(图例) <fieldset style=”width:155px;height:269px;”> <legend align=”top”>图书分类</legend> </fieldset> 七、标签语义化:标签语义化其实就是把你想要表达的东西 更容易被搜索引擎理解和重视。 对于文字加粗<b></b>是加粗,strong是重点强调并加粗。 <s></s>是一个普通删除线,而<del></del>更具有语义化,他除了删除一个内容,并且还带有cite和datetime表示删除的原因和时间。 cite(引用) <del cite=”我不喜欢” datetime=”2017-1-1”>gdg</del> <ins>下划线</ins>取代<u>下划线</u> <em>斜体</em>取代<i></i> 缩写<abbr title=”hyper text market language”>html</abbr> <acronym></acronym>首字母缩略词。 转义: 版权符号:© <br/>:<br/>
转载请注明原文地址: https://www.6miu.com/read-73352.html

最新回复(0)