HTML学习-20180821

今日学一点HTML:

<!DOCTYPE html>
<html>
<head>
    <title>20180821日</title>
</head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<body>
    <div>
    <h1>标题标签</h1>
    <div>文本标签</div>
    <p>段落标签</p>
    换行标签<br/>
    <pre>会保留代码格式标签</pre>
    <span>行内元素标签,不自动换行,宽度由文本内容决定</span>
    &copy;版权符号
    &nbsp;一个空格
    <a href="跳转目标的地址或网址" target="_self本页加载|_blank另起一页加载" title="鼠标移动至该文本|图片标志下时出现的内容">链接标签</a>
    <img src="绝对路径|相对路径|URL路径" height="20px" width="20px" alt="图片无法加载"/>
    绝对路径:"D:/img/logo01.png"
    相对路径:
        同文件夹时;"logo01.png"
        图上时;"../../logo01.png"
        图下时;"img/logo01.png"
    URL路径:"https://www.baidu.com/img/logo01.png"
    <div style="height:20px;background:red">文本的高度和背景颜色</div>
    <p align="lift|right|center|justify">段落居左右中两端对齐,注意与文本标签<div></div>属性定义的区别</p>
    <sub>下标标签</sub>
    <sup>上标标签</sup>
    <strong>字体加粗标签</strong>
    <b>字体加粗标签</b>
    <em>字体倾斜标签</em>
    <i>字体倾斜标签</i>
    锚点定位:先命名后定位
        向下定位
        <a href="#" name="anchorone">定位处</a>
        <a href="#anchorone">点击处<a>
        相互定位
        <a href="#anchorone">点击处<a>
        <a href="#" name="anchorone">定位处</a>
    </div>
</body>
</html>

猜你喜欢

转载自blog.csdn.net/lizengbao/article/details/81913568