亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

搜索
博主信息
博文 9
粉絲 0
評(píng)論 0
訪問量 9500
最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板
html常用知識(shí)總結(jié)--2019年8月30日 20點(diǎn)
cat的博客
原創(chuàng)
972人瀏覽過

一、html標(biāo)簽、元素與屬性

html標(biāo)簽一般是成對(duì)出現(xiàn),有開頭和結(jié)尾,比如 <h1></h1>、<p></p>等叫做雙標(biāo)簽,還有比如<hr>、<br>等單標(biāo)簽。

html元素可以描述網(wǎng)頁的構(gòu)成,比如標(biāo)識(shí)標(biāo)題的<h1></h1>,標(biāo)識(shí)圖片的<img />, 標(biāo)識(shí)段落的<p></p>。

hmtl元素還有自己的屬性,比如<img />標(biāo)簽家加上src屬性<img src="" />,用來表明圖片的地址,比如給<a>標(biāo)簽加上

src屬性<a href=""></a>可以表明要跳轉(zhuǎn)的地址。

二、列表

列表有無序列表<ul>、有序列表<ol>、定義列表<dl>

有序列表定義方式

<ul>
    <li>無序列表</li>
    <li>無序列表</li>
    <li>無序列表</li>
</ul>

無序列表定義方式

<ol>
    <li>有序列表</li>
    <li>有序列表</li>
    <li>有序列表</li>
</ol>

定義列表

<dl>
    <dt>標(biāo)題</dt>
    <dd>內(nèi)容</dd>
</dl>

三、列表與表格

列表是對(duì)信息的逐條展示,表格是對(duì)每條信息進(jìn)行歸類整理逐條展示。表格是在列表基礎(chǔ)上進(jìn)行逐條信息的提取歸類整理劃分。

當(dāng)展示某類的信息的單一屬性比如只展示所有文章的標(biāo)題這一屬性,就可以用列表,是對(duì)單一屬性展示不需要區(qū)分。

而當(dāng)要展示出某類信息的所有屬性比如所有文章的標(biāo)題、描述、寫作時(shí)間等,這時(shí)用表格,因?yàn)樾枰诿織l信息中對(duì)屬性區(qū)分。

四、編程實(shí)現(xiàn)工作計(jì)劃,分別用ul、ol、dl實(shí)現(xiàn)

ul實(shí)現(xiàn)

<ul>
    <li>第一天用編寫ul列表</li>
    <li>第二天用編寫table表格</li>
    <li>第三天用編寫form表單</li>
</ul>

ol實(shí)現(xiàn)

<ol>
    <li>第一天用編寫ul列表</li>
    <li>第二天用編寫table表格</li>
    <li>第三天用編寫form表單</li>
</ol>

dl實(shí)現(xiàn)

<dl>
    <dt>第一天</dt>
    <dd>編寫ul列表</dd>
    <dt>第二天</dt>
    <dd>編寫table表格</dd>
    <dt>第三天</dt>
    <dd>編寫from表單</dd>
</dl>

五、商品清單表格

實(shí)例

<table border="1" width="500" cellspacing="0" cellpadding="5">
        <caption>
            <h3>購物清單</h3>
        </caption>
        <!-- 頭部 -->
        <thead>
            <th>編號(hào)</th>
            <th>名稱</th>
            <th>價(jià)格</th>
            <th>數(shù)量</th>
            <th>金額</th>
            <th>分類</th>
        </thead>
        <!-- 表體 -->
        <tr>
            <td>1</td>
            <td>Html5精通</td>
            <td>100</td>
            <td>1</td>
            <td>100</td>
            <td rowspan="4">大前端</td>
        </tr>
        <tr>
            <td>2</td>
            <td>Css3精通</td>
            <td>100</td>
            <td>1</td>
            <td>100</td>
        </tr>
        <tr>
            <td>3</td>
            <td>JavaScript精通</td>
            <td>100</td>
            <td>2</td>
            <td>200</td>
        </tr>
        <!-- 頁腳 -->
        <tr>
            <td colspan="3" align="center">總計(jì):</td>
            <td>4</td>
            <td>400</td>
        </tr>
    </table>

運(yùn)行實(shí)例 ?

點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例

六、 注冊(cè)表單

實(shí)例

<form action="" method="POST">
        <p>
            <label for="username">賬號(hào):</label>
            <input type="text" id="username" name="username" placeholder="請(qǐng)輸入賬號(hào)" />
        </p>
        <p>
            <label for="password">密碼:</label>
            <input type="password" id="password" name="password" placeholder="請(qǐng)輸入密碼" />
        </p>
        <p>
            <label for="email">郵箱:</label>
            <input type="email" id="email" name="email" placeholder="example@qq.com" />
        </p>
        <p>
            <label for="">性別:</label>
            <input type="radio" id="male" name="sex" /><label for="male">男</label>
            <input type="radio" id="female" name="sex" /><label for="female">女</label>
            <input type="radio" id="secrecy" name="sex" checked /><label for="secrecy">保密</label>
        </p>
        <p>
            <label for="">愛好:</label>
            <input type="checkbox" id="run" name="fonds[]" /><label for="run">跑步</label>
            <input type="checkbox" id="work" name="fonds[]" /><label for="work">寫代碼</label>
            <input type="checkbox" id="music" name="fonds[]" /><label for="music">聽音樂</label>
        </p>
        <p>
            <label for="">課程:</label>
            <select name="" id="">
                    <option value="">請(qǐng)選擇</option>
                <optgroup label="后端">
                    <option value="">php</option>
                    <option value="">mysql</option>
                    <option value="">laravel</option>
                </optgroup>
                <optgroup label="前端">
                    <option value="">html</option>
                    <option value="">css</option>
                    <option value="">javascript</option>
                </optgroup>
            </select>
        </p>
        <p>
            <input type="submit" name="submit" value="提交" />
            <input type="reset" name="reset" value="重置" />
            <input type="button" name="button" value="按鈕" />
        </p>
        <p>
            <button type="">按鈕</button>
        </p>
    </form>

運(yùn)行實(shí)例 ?

點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例

七、總結(jié)

1、<a>標(biāo)簽常用來表示鏈接跳轉(zhuǎn),<h>標(biāo)簽用來表示文章標(biāo)題,<img>標(biāo)簽用來表示圖片。

2、列表中的<ul>無序列表比較常用,主要用來展示信息,比如新聞列表。

3、table表格經(jīng)常會(huì)用到,比如購物清單、公司員工清單等。

4、form表單經(jīng)常用到,在網(wǎng)站的登錄、注冊(cè)等。

5、form表單中很多的控件像<input type="text" />輸入框、單選框<input type="radio" />、多選框<input type="checkbox" />、下拉框<select>、提交按鈕<input type="submit" />、重置按鈕<input type="reset" />、按鈕<button>,都是經(jīng)常用到的。



批改狀態(tài):合格

老師批語:作業(yè)完全符合要求,肯定花了不少心思吧, 做來程序員, 就應(yīng)該有這樣的精神, 已經(jīng)推薦了
本博文版權(quán)歸博主所有,轉(zhuǎn)載請(qǐng)注明地址!如有侵權(quán)、違法,請(qǐng)聯(lián)系admin@php.cn舉報(bào)處理!
全部評(píng)論 文明上網(wǎng)理性發(fā)言,請(qǐng)遵守新聞評(píng)論服務(wù)協(xié)議
0條評(píng)論
關(guān)于我們 免責(zé)申明 意見反饋 講師合作 廣告合作 最新更新
php中文網(wǎng):公益在線php培訓(xùn),幫助PHP學(xué)習(xí)者快速成長!
關(guān)注服務(wù)號(hào) 技術(shù)交流群
PHP中文網(wǎng)訂閱號(hào)
每天精選資源文章推送
PHP中文網(wǎng)APP
隨時(shí)隨地碎片化學(xué)習(xí)
PHP中文網(wǎng)抖音號(hào)
發(fā)現(xiàn)有趣的

Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號(hào)

  • 登錄PHP中文網(wǎng),和優(yōu)秀的人一起學(xué)習(xí)!
    全站2000+教程免費(fèi)學(xué)