HTML标题

一、标签

1.给页面取名字的标签,显示在页面栏

<title></title>

运行时对html右键,点击show in Explorer

2.一共六级标题,从H1到H6,数字从小到大,字号从大到小

<h1>一级标题</h1>      <h6>六级标题</h6>

3.font可以调整文字字体大小、样式、颜色

<font face="新宋体" size="7" color="red"></font>

4.h1与font的组合

<h1><font face="楷体"></font></h1>

5.新版本的删除标签,strike标签已经废弃

<del>写在这个标签里的文字会被划上一条横线</del>

6.下划线标签:underscore

<u>在这段文字下面会有一条下划线</u>

7.用来换行的标签

<br>

8.斜体标签

<i>这段文字会是倾斜的</i>

9.增强标签

<strong></strong>

10.粗体标签

<b></b>

11.想给页面的背景换上图片

先把图片粘贴到包中,在background中写上自己图片的地址

<body background="111.png"></body>

12.p标签主要的特点就是换行和段间距

<p>一个</p>

<p>两个</p>

13.预定义格式标签,在这个标签里写的回车和空格都会生效

<pre>

床前明月光,

疑是地上霜。

</pre>

14.显示图片的标签

<imp src="111.png" height="300px" width="875px">

二、列表

1.有序列表,start表示起始序号,不写默认为1,type为编号类型

<ol type="1" start="6">

    <li>一个</li>

    <li>两个</li>

</ol>

2.无序列表,不再有序号,而是由·的形式标注

<ul>

    <li>一个</li>

    <li>两个</li>

</ul>

三、超链接

可以跳转到html页面、网站、包中的视频、发送邮件等

<a href="test1.html">1</a>

点击1就可以跳转

四、表格

border="1"用来设置表格的边框

<table width="400px" height="400px" border="1">

    <caption>表格的标题</caption>

    <tr>

        <td colspan="3" rowspan="2"></td><td></td>

    </tr>

    <tr>

        <td></td>

    </tr>

    <tr>

        <td></td><td></td><td></td><td></td>

    </tr>

<tr>

        <td></td><td></td><td></td><td></td>

    </tr>

</table>

colspan表示同一行的多列单元格的合并,跨列合并

rowspan表示同一列的多行单元格的合并,跨行合并

五、表单

<form>
    姓名:<input type="text" name="a" size="40"><br>
    年龄:<input type="text" name="b" maxlength="10"><br>
    密码:<input type="password"><br>
<!--    同一组单选框,name的值必须相同-->
    性别:<input type="radio" name="c" checked> 男 <input type="radio" name="c"> 女 <br>
    爱好:<input type="checkbox">唱歌 <input type="checkbox">跳舞
    <input type="checkbox">跑步
    <br>
    地址:<select>
             <option>北京</option>
             <option>上海</option>
             <option>广州</option>
             <option>深圳</option>
          </select>
</form>

六、div

<!--div标签默认没有任何的效果-->
<div style="font-size: 300px;color: red;font-family: 楷体">
    div标签里的内容
</div>

<div style="background-color: orange">
    一个新的div
</div>
<div style="background-color: orange;width: 300px;height: 300px">

</div>

<div style="background-color: red;width: 300px;height: 300px;border-radius: 150px">

</div>
<!--    给当前页面设置统一的div样式-->
    <style>
        .abc{
            width: 300px;
            height: 300px;
            background-color: lightskyblue;
        }
    </style>
</head>
<body>

<!--给div选择对应的样式-->
<div class="abc"></div>
<div></div>

<p class="abc"></p>

  • 13
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值