html 快捷鍵及簡單代碼


一.快捷鍵

1、隱藏:ctrl+shift+?

2、保存:ctrl+s

3、復制:ctrl+c

4、粘貼:ctrl+v

5、撤銷:ctrl+z

二.簡單符號

1、標簽,成對存在:<   >

2、結束標簽:</  >

3、大標題:<title>    </title>

4、小標題(分為 h1-h6,標題大小不同):<h1>    </h1>

5、段落:<p>    </p>

6、換行:<br>

7、下標:<sub>     </sub>

8、上標:<sup>     </sup>

9、加粗文本:<b>    </b><br><br>

10、斜體文本:<i>    </i><br><br>

11、電腦自動輸出:<code>    </code><br><br>

三.代碼

1、覆蓋跳轉到百度:<a href="http://www.baidu.com">跳轉到百度</a>

2、打開新界面、跳轉到百度:<a href="http://www.baidu.com target="_blank">跳轉到百度</a>

3、文字居中顯示:<h1 style="text-align: center;">文字居中顯示</h1>

4、插入圖片並設置寬、高:<img src="img/logo.png" width="258" height="39" />

5、文字替代(加載不出圖片的時候):<img border="0" src="img/pulpit.jpg" alt="Pulpit rock" width="304" height="228">

6、帶表頭的邊距為1的表格:

<table border="1">

    <tr>

        <th>Header 1</th>

        <th>Header 2</th>

    </tr>

    <tr>

        <td>row 1, cell 1</td>

        <td>row 1, cell 2</td>

    </tr>

    <tr>

        <td>row 2, cell 1</td>

        <td>row 2, cell 2</td>

    </tr>

</table>

7、無序列表

<ul>
    <li>Coffee</li>
    <li>Tea</li>
    <li>Milk</li>
</ul>

8、通過十六進制設置背景顏色

<p style="background-color:#FFFF00">
通過十六進制設置背景顏色
</p>

9、通過 rbg 值設置背景顏色

<p style="background-color:rgb(255,255,0)">
通過 rbg 值設置背景顏色
</p>

10、通過顏色名設置背景顏色

<p style="background-color:yellow">
通過顏色名設置背景顏色
</p>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM