HTML標籤用法

來源:互聯網
上載者:User

標籤:指令   row   inpu   div   用法   html標籤   hidden   文字框   box   

<!DOCTYPE> 聲明必須位於 <html> 標籤之前。它不是 HTML 標籤;它是指示 網頁瀏覽器關於頁面使用哪個 HTML 版本進行編寫的指令。

資訊輸入標籤:input

1.插入文字框——text(單行文本)

<input name="表單名稱" type="text" maxlength="輸入字串最大長度" size="寬度改變" value="預設值" />

2.插入密碼框——password

<input name="" type="password" maxlength="" size="" />

3.插入檔案域——file(選擇並返迴文件)

<input name="" type="file" />

4.插入複選框——checkbox

<input name="同一組組名" type="checkbox" id="" value="" checked="checked" />

5.插入選項按鈕——radio

<input name="同一組組名" type="radio" id="" value="" />

6.插入標準按鈕——button

<input name="" type="button" id="" value="" />

7.插入提交按鈕——submit

<input name="" type="submit" value="" />

8.插入重設按鈕——reset

<input name="" type="reset" value="" />

9.插入映像域——image

<input name="" type="image" src="url" />

10.插入文字域——textarea(個人認為是對單行文字框text的擴充:多行文本,可展開)

<textarea name="" rows="" cols="" wrap="" id="">預設內容</textarea>

11.插入隱藏欄位——hidden(提交表單時,該域的內容一起被發送到伺服器,而使用者不可見)

<input name="" type="hidden" value="" />

此外label標籤可以與input一起使用,如:

<label for="searchField(必須是input的ID)">Please Input: </label>

<input id="searchField" />

 

 

下拉式清單:

<select size="3">    <!--size的值為顯示選項的個數-->    <option value="1">選項一</option>    <option value="2">選項二</option>    <option value="3">選項三</option></select>

 

HTML標籤用法

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.