1. 程式人生 > >01: html常用標簽

01: html常用標簽

html 表單 css url align color rac 是什麽 選項

1.1 web開發的三把利器介紹

  1. HTML :可以比作一個赤裸裸的人站在這裏(就是自身帶有一些屬性)

      1、-- 20個標簽

      2、-- HTML實質就是瀏覽器能夠認識的規則

      3、開發者:

          - 寫html文件(充當模板的作用)

          - 數據庫獲取數據,然後替換到html文件指定位置(web框架)

  2. CSS :就是=給這個人穿上華麗的衣服

      -- 顏色

      -- 位置

  3. JS :讓這個人可以動

1.2 網頁頭部head標簽中幾個常用標簽

  1、Head標簽之<meta>標簽

    1. 頁面編碼(告訴瀏覽器是什麽編碼)

        <meta charset="UTF-8">  <!--  這種不成對的叫自閉合標簽 -->

    2. 刷新和跳轉

        <meta http-equiv="refresh" content="3">                                  <!-- 3秒刷新一次頁面 -->
        <meta http-equiv="refresh" content="3;Url=http://www.baidu.com.cn">     
<!-- 3s自動跳轉到指定頁面 -->

    3. 關鍵字搜索

        <meta name="keywords" content="關鍵字1,關鍵字2">

    4. X-UA-CompatibleIE兼容性問題

        說明:優先使用IE9對網頁渲染,如果不是IE9再使用IE8

        <meta http-equiv=”X-UA-Compatible” content=”IE=IE9;IE=IE8;″ />

  2、head中其他標簽

      <title> Title </title>
      <link rel="stylesheet" type="text/css" href="base.css" />


      <style> </style>
      <script src="base.js"> </script>

1.3 html常用標簽歸類

  1、行內標簽

      1. <span>

      2. <a>

      3. <input>

      4. <pre> {{ enroll_obj.enrolled_class.contract.template }} </pre> #數據庫文本格式什麽樣就在前端怎樣顯示

  2、可以提交數據到後臺的標簽

    1. Form表單中有兩個參數:

  1) action : 指定將表單中數據提交到哪個服務器

  2) method : 指定使用post(字典)或者get(url)提交數據

    2. input中的屬性

        1) type="text"          ---  提交單行文本文件
        2) type="password"      ---  提交密碼
        3) type="file"          ---    提交文件
        4) type="submit"        ---   將數據提交
        5) type="radio"         ---   單選框
        6) type="checkbox"      ---   多選框
        7) type="button"        ---   按鈕標簽
        8) type="rest"          ---   將所有自己填的數據全部重置

    3. <textarea>默認內容</textarea> //多行文本輸入

    4. <select> <option>選項值 </option> </select> //下拉菜單

  3、塊級標簽

      1. <p>

      2. <div>

      3. <h1>

      4. <img>

      5. <ol><li> </li></ol>

       <ul><li> </li></ul>

      6. <table> </table>

01: html常用標簽