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>

 

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

 


免責聲明!

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



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