1. 程式人生 > >實驗樓HTML基礎入門學習

實驗樓HTML基礎入門學習

com 矩形 超文本 Enctype wan html rip submit 鏈接

HTML基本介紹

HTML,一種描述網頁的語言

結構

  • html
    • head
      • title
      • script
    • body
      • ...

文檔

<html>
    <head>
            <title>.....</title>
    </head>

    <body>
            <p>.....</p>
    </body>
</html>

標簽

元素是一整條,如

;而標簽則代表了一個,如

,

HTML文本

HTML元素


一個換行符

兩個換行符

HTML屬性

是在 HTML 元素的開始標簽中定義。 總是以名稱和值對應的形式出現,比如:name="value"。 屬性值應該始終被包括在引號內。雙引號是最常用的,不過使用單引號也沒有問題

HTML文本格式化

常用

  • < b> (bold)粗體
  • < big> (big)大字體
  • < em> (emphasized)強調字
  • < i> (italic)斜體
  • < small> (small)小字體
  • < strong> (strong)加重語氣

HTML樣式

用style一氣呵成的解決背景,顏色,各種

超文本

鏈接

  • < a href="http://www.shiyanlou.com">shiyanlou< /a>
  • target等於_self或_blank
  • 添加提示文字title
  • 一頁中怎麽停泊,錨

       <a href="#跳轉目的地名稱">跳轉起始字符</a>
       ...
       ...
       ...
       <a name="跳轉目的地名稱">跳轉目的地字符</a>

    表格

     <table  align="center" border="1">  
            <tr>
            <td>first row and first column</td>
            <td>first row and second column</td>
            <td>first row and third column</td>
            </tr>
    
            <tr>
            <td>second row and first column</td>
            <td>second row and second column</td>
            <td>second row and third column</td>
            </tr>
     </table>  

    屬性

  • border外邊框
  • colspan:控制此單位所占列數
  • rowspan:控制此單位所占行數

HTML圖像

  • <img src="path">
  • align屬性,調整對齊bottom、middle、top左右可加的參數有right,left默認為right
  • width="80" height="80"
  • 規定區域點擊
    • rect(矩形)、circle(圓形)、poly(多邊形)
    • coords有4個值,分別用逗號隔開,表示矩形區域左上角x坐標、左上角y坐標、右下角x坐標和右下角y坐標

      <map>
      <area shape="rect" coords="" href="" target="">
      </map

列表list(order, unorder)

<ol>
 <li>balabala</li> 
</ol>

有序:type, 采用什麽排序;start, 以什麽開始
無序:type,Disc(默認)實心黑點;Circle小圈;square方點

註釋

<!--這是一段註釋。註釋不會在瀏覽器中顯示。-->

HTML表單

用於數據的提交,評論

<form> 
<input type="radio" name="sex" value="male" /> Male 
<br/> 
<input type="radio" name="sex" value="female" /> Female 
</form>

type類型

  • usename, password
  • 單選框radio, 多選框checkbox

基礎匯總實驗截取

選了表單方面,css什麽暫時不管

<!DOCTYPE html>
<html>
<head>
    <title>test_form</title>
</head>
<body>
    <form action="MAILTO:[email protected]" method="post" enctype="text/plain">
        <h3>Send email to shiyanlou</h3>
        your name:<br>
        <input type="text" name="name" value="yourname" size="20">
        <br>
        your email:<br/>
        <input type="text" name="mail" value="youremail" size="20">
        <br>
        what you want say:<br>
        <input type="text" name="comment" value="yourcomment" size="20">
        <br><br>
        <input type="submit" value="send">
        <input type="reset" value="reset">
    </form>
</body>
</html>

參考鏈接

實驗樓前端路徑

實驗樓HTML基礎入門學習