html 与 html5 的那点事儿

来源:互联网 发布:ipad怎么装windows系统 编辑:程序博客网 时间:2024/05/07 10:31

html 

一.html 与css 基本标签

1.html基础标签

    

标签

 h1-h6                         标题标签

 p                                 段落标签(写在p标签内的文字自成一行)

<br />                         换行标签

<b></b>                     加粗字体(不常用)

<strong></strong>    加强语气-加粗(常用)

<i></i>                       加强语气-倾斜(不常用)

<em></em>               加强语气-倾斜(常用)

<hr/>                          带一条直线的换行符

 width=80%                hr参数,:  宽度

no shade=“noshed"    hr参数 : 加粗

align=“left”                 hr 参数 :对齐方式

img                             图片

src                              img参数:图片路径

alt                               img参数:图片占位文字 (在图片没有加载出来时占位)

<a  href=“ http://baidu.com”></a>   超链接

target=“_blank”          a参数 : 窗口在新窗口打开

target=“_self”             a参数 : 窗口在原窗口打开

<pre></pre>               按照原来格式输出

div                              将页面分块,模块化

行标签 : h1-h6 , a , b ,i , s , u ,<strong> , <em>, input , span   

块标签 : div , p , hr , ol , ul , dl ,  li , dt , dd    


列表

无序列表

 <ul  type=“">

   <li></li>

   <li></li>

   <li></li>

</ul>

           type参数(  square : 实心方块

                  circle :  空心圆

                  disc :  实心圆 (默认)

                  none: 没有样式)

 有序列表

<ol type=“ “ ,start=“ ">

   <li></li>

   <li></li>

   <li></li>

</ol>

          type参数:

                 a : 小写字母

                 i : i , ii , iii

                 start : 从哪开始


自定义列表

 <dl>

   <dt>标题</dt>

   <dd>内容</dd>.

   <dd>内容</dd>.

   <dd>内容</dd>.

</dl>


常用符号

&nbsp;                     空格

&copy;                     版权号

&reg;                        注册商标

&quot;                      双引号

&amp;                      取地址符

&gt;                          大于号

&lt;                            小于号

2.css2 基本样式

    

color  : red;          文本颜色

width : 50px;       设置宽度

height: 50px        设置高度

background-color: red ;      

background-color:  rub(84,121,30);     设置背景颜色

border :5px   solid  black;                    设置边框宽度及实线颜色

text-indent : 30px                                 标签文本开头空处30px

text-decoration : underline;                  标签文本内容加下划线

text-decoration : line-through;              文本贯穿线

text-decoration : none;                         取消a标签的下划线

text-align : center;                                内容居中

font-size : 30px                                    字体大小

font-family : STSong                            字体

font-weight :italic                                 文字加粗    

background-image : url(omg/n.jpg)     背景图片

background-repeat : no-repeat;          背景是否平铺

background-size : 100%,100%          背景尺寸


0 0