HTML

本文详细介绍了HTML的基本用法,包括文本编辑器的选择、HTML文件的基本框架、段落与字体样式的设置、列表与链接的创建方法等,适合HTML初学者。

the Hypertext Markup Language 

 

1.软件准备

        文本编辑器       mac: TextMrangler   Windows:PSPad

        浏览器

 

2.HTML文件框架

        <!DOCTYPE html>        //h5标识

        <html></html>         

        <head></head>        

        <title></title>

        <meta charset-utf-8>   

        <body></body>

3.段落

        <p></p>         

        <h1></h1>

        <hgroup></hgroup>

        <sup></sup>                          上角标

        <sub></sub>                          下角标

        <br></br>                            换行

        <wbr></wbr>                          word换行可打连词符

4.字体样式

        <b></b>

        <i></i>

        <small></small>

        <del></del>

        <ins></ins>

        <mark></mark>

5.短语格式

        <em>em强调</em>

        <strong>strong强调</strong>

        <dfn>definition定义</dfn>

        <code>code代码</code>

        <samp>samp例子代码</samp>

        <kbd>kbd用户输入</kbd>

        <var>variable变量</var>

        <cite>cite引用</cite>

6.特殊格式

        <address><address>

        <blockquote></blockquote>

        <q></q>

        <pre></pre>

7.属性

        <hr width=50% align=left size=1>

        <abbr title=“人民币”>RMB</abbr>

        “<”等于           &lt;    

        “>”等于           &gt;

        “&”等于           &amp;

        “空格”等于         &nbsp;

        “ü”等于           &uuml;

        “Ü”等于           &Uuml;

8.列表

            无序列表

                    <ul> 

                       list item 列表项            

                                <li></li>

                     </ul>

             有序列表,开始序号从2开始

                        <ol start=2>

                                <li></li>

                        </ol>

 

              词条

                      <dt></dt>

                      <dd></dd>

 

              <img src="/Users/Artemis/Desktop/安装NodeJs.png” alt=“安装node.js” width=“200" height=“100”>

 

              png gif jpg

             

 

9.链接

        图片链接

<a href=“http://news.163.com”><img src=“http://imgsize.ph.126.net/?imgurl=http://cms-bucket.nosdn.127.net/a808d079301a466482d23ad21c3696eb20161031075716.jpeg_300x400x1x85.jpg” alt=“小女孩”></a>

        链接页面内某处

<a href=“#p1”>回到第一段</a>

        新窗口打开链接

<a href=“http://www.baidu.com” target=_blank>百度</a>

        在页面某处链接显示其他网页

<iframe src=“http://news.163.com” width=“500” height=“1000”></iframe>

        地图点击图片不同位置链接不同地方

<img src=“http://imgsize.ph.126.net/?imgurl=http://cms-bucket.nosdn.127.net/a808d079301a466482d23ad21c3696eb20161031075716.jpeg_300x400x1x85.jpg” width=“100” height=“100” usemap=“#map”>

<map name=“map”>

<area shape=“rect” coords=“0,0,50,50”href=“http://news.163.com” alt=“news”>

<area shape=“circle” coords=“75,75,25” href=“http://www.163.com” alt=“home”>

</map>

 

10.表格

        <table border=“1”>

                <acption>表格</caption>

                <thead>

                        <tr>

                            <th>OS</th>

                            <th>Chinese</th>

                            <th>French</th>

                        </tr>

               </thead>

               <tbody>

                     <tr>

                            <td>iOS10</td>

                            <td>yes</td>

                            <td>yes</td>

                     </tr>

                     <tr>

                            <td colspan=“3”>windows</td>

                    </tr>

                </tbody>

                <tfood>

               </tfood>

        </table>

 

    

转载于:https://my.oschina.net/ArtemisFang/blog/832552

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值