天天看點

我的前端學習之路

初學者——html篇

html初級标簽

  1. 段落标簽:

    <p></p>

  2. h${标題}*6:

    <h1></h1>

    ~

    <h6></h6>

    ,從大到小,每個标題獨占一行,可以用來更改字型大小,加粗字型;
  3. <strong>加粗内容</strong>

  4. <em>斜體展示内容</em>

  5. <del>50元</del>

    ;50元
  6. <address>位址标簽</address>

  7. <div></div>

    使得①“容器”分塊明确(結構化);②綁定操作;
  8. <span></span>

    ;

    html進階标簽:

  9. html編碼:空格展示

    &nbsp

    ,小于符

    &lt

    ,大于符

    &gt

    ;
  10. 回車,換行:

    <br>

    ,水準線:

    <hr>

    ;
  11. 有序清單:

    <ol type="1/a/A/i/I"><li>編碼</li></ol>

    .

    <ol>

    裡面的要求:①type=“數字/字母/羅馬數字”;②倒序排序:

    reversed="reversed"

    ;③從第幾個開始排:如

    type="a" start="3"

    表示從c開始排。
  12. 無序清單:

    <ul><li>編碼</li></ul>

    <ul>

    裡面

    type="disc"

    圓點:disc(預設);方塊:square;空心圓:circle。

    css代碼:去掉空隙:

    *{margin:0;padding:0;}

    ;

    去掉圓點:

    ul{list-style:none;}

    橫行排列:

    li{float:left;margin:0 10px;line-style:25px;padding:0 5px;}

  13. img标簽

    <img src="圖檔位址">

    圖檔位址有網上位址(在新标簽中打開圖檔)、本地的絕對路徑、本地的相對路徑。圖檔占位符:

    alt="淘寶"

    ,即當圖檔位址發生錯誤時,展示文字資訊。圖檔提示符:

    title="這是美羊羊"

  14. a标簽:

    <a href="http://www.baidu.com" target="_blank" rel="external nofollow" >百度</a>

    内容可以是任意形式,如:文字、圖檔。

    target="_blank"

    表示在新标簽中打開另一個頁面。a标簽最原始的功能:作為錨點記錄位置。如:
    我的前端學習之路

    a 标簽作用:

    ①超連結;

    ②錨點;

    ③“打電話”,如:

    <a href="tel:10086" target="_blank" rel="external nofollow" style="front-size:10rem">中國移動</a>

    ;“發郵件”,如:

    <a href="mailto:2517***@qq.com" target="_blank" rel="external nofollow" >發郵件</a>

    ;④協定限定符。如:

    <a href="javascript:while(1){alert('讓你手欠')}" target="_blank" rel="external nofollow" >點我試試</a>

  15. 表單标簽:

    <form></form>

    ,向後端發送資料。
    我的前端學習之路
    代碼示例:
    我的前端學習之路
    單選按鈕:

    <input type = " radio">

    ;

    複選按鈕:

    <input type = "checkbox" name = "fruit" value = "apple">

    下拉菜單:

    <select><option></option></select>

附學前端學習架構:

我的前端學習之路

注:第一次寫部落格,還不是一名合格的程式媛,如有錯誤,可以指正,謝謝!