1. 程式人生 > >html的一些基本屬性介紹

html的一些基本屬性介紹

一、html的屬性型別:

1、常見標籤屬性:

a、<h1>:align對其方式      例如:<h1  align="right"> hhhhh</h1> 表示標題hhhhh右對齊

b、<body>:bgcolor背景顏色

c、<a>:target規定在何處開啟連結

2、通用屬性:

a、class:規定元素的類名

b、id;規定元素唯一id

c、style:規定元素的樣式

d、title:規定元素的額外資訊

二、html格式化:

程式碼演示和效果演示:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>study</title>
    </head>
    <body>
        <b>i like the mcu</b>
        <br/>
        <big>i like the mcu</big>
        <br/>
        <em>i like the mcu</em>
        <br/>
        <i>i like the mcu</i>
        <br/>
        <small>i like the mcu</small>
        <br/>
        <strong>i like the mcu</strong>
        <sub>i like the mcu</sub>
        <br/>
        hhhh<sub>i like the mcu</sub>hoho
        <br/>
        <sup>i like the </sup>
        <br/>
        <ins>i </ins>
        <br/>
        <del>i like the mcu</del>
    </body>
</html>

三、關於有序列表和無序列表的補充使用方法:

1、無序列表的使用:

程式碼演示和效果演示:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>study</title>
    </head>
    <body>
        <ul type="disc">
            <li>
                i like the mcu
            </li>
            <li>
                i like the mcu
            </li>
        </ul>
        
        <ul type="circle">
            <li>
                i like the mcu
            </li>
            <li>
                i like the mcu
            </li>
        </ul>
        
        <ul type="square">
            <li>
                i like the mcu
            </li>
            <li>
                i like the mcu
            </li>
        </ul>
    </body>
</html>

2、有序列表的使用:

程式碼和效果演示如下:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>study</title>
    </head>
    <body>
        <ol type="1">
            <li>
                i like the mcu
            </li>
            <li>
                i like the mcu
            </li>
        </ol>
        
        <ol type="a">
            <li>
                i like the mcu
            </li>
            <li>
                i like the mcu
            </li>
        </ol>
        
        <ol type="A">
            <li>
                i like the mcu
            </li>
            <li>
                i like the mcu
            </li>
        </ol>
        <ol type="i">
            <li>
                i like the mcu
            </li>
            <li>
                i like the mcu
            </li>
        </ol>
    </body>
</html>

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------每天學一點點,日積月累你也是專家!

&n