雖" />
時(shí)間:2023-10-02 19:42:01 | 來源:網(wǎng)站運(yùn)營
時(shí)間:2023-10-02 19:42:01 來源:網(wǎng)站運(yùn)營
從零開始,學(xué)習(xí)web前端之HTML基礎(chǔ):<!DOCTYPE html> 聲明文檔類型<html> 根標(biāo)簽 <head> 頭部標(biāo)簽 <meta charset="utf-8" /> 編碼方式:通用字符集 <title></title> 標(biāo)題 </head> <body> 主體標(biāo)簽 </body></html>
<! Doctype html> <br/> <hr/>
<html></html> <head></head> <title></title>
<head><title></title></head>
父子<head></head><body></body>
兄弟姐妹<head> <meta charset="UTF-8"> <link rel="shortcut icon" href="img/logo.ico"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="description" content="個(gè)人簡介"> <meta name="keywords" content="喻志強(qiáng),個(gè)人網(wǎng)站,個(gè)人簡介,喻志強(qiáng)的個(gè)人網(wǎng)站,喻志強(qiáng)的個(gè)人簡介"/> <title>個(gè)人簡介</title> <link rel="stylesheet" href="css/base.css"/> <script type="text/javascript" src="js/center.js"></script> </head>
告訴瀏覽器以最新版本的ie內(nèi)核去渲染頁面或者使用Google Chrome Frame(谷歌內(nèi)嵌瀏覽器框架GCF)去渲染頁面<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
網(wǎng)頁關(guān)鍵字,有利于seo的收錄<meta name="keywords" content="喻志強(qiáng),個(gè)人網(wǎng)站,個(gè)人簡介,喻志強(qiáng)的個(gè)人網(wǎng)站,喻志強(qiáng)的個(gè)人簡介"/>
網(wǎng)頁的描述<meta name="description" content="個(gè)人簡介">
網(wǎng)頁重定向 2秒后跳轉(zhuǎn)到百度首頁<meta http-equiv="refresh" content="2;https://www.baidu.com/" />
默認(rèn)設(shè)置超鏈接打開新的窗口<base target="_blank" />
網(wǎng)頁的logo<link rel="shortcut icon" href="img/logo.ico" />
鏈接外部樣式表<link rel="stylesheet" href="css/base.css"/>
鏈接外部js腳本<script type="text/javascript" src="js/center.js"></script>
<br/> 換行標(biāo)簽<hr/> 水平線<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title></title> </head> <body> 第一行<br/> 第二行 <hr /> </body></html>
<p></P> 文本段落標(biāo)簽<font>文本標(biāo)簽</font><strong>加粗</strong> <b>加粗</b><em>傾斜</em><i>傾斜</i><del>刪除線</del><s>刪除線</s><ins>下劃線</ins><u>下劃線</u>
<img src="img/34.jpg" alt="小狗" title="兩只小狗" width="300px" />
Src: 圖片的來源 必寫屬性<a href="https://www.baidu.com/" target="_blank" title="百度官網(wǎng)">百度</a>
href : 去往的路徑(跳轉(zhuǎn)的頁面) 必寫屬性<div id="top">頂部</div>
2.超鏈接到錨點(diǎn)<a href="#top">回到頂部</a>
特殊字符<ul type="square"> <li>item</li> <li>item</li> <li>item</li> <li>item</li> <li>item</li></ul>
<ol type="1" start="2"> <li>item</li> <li>item</li> <li>item</li> <li>item</li> <li>item</li></ol>
<dl> <dt>標(biāo)題</dt> <dd>內(nèi)容</dd> <dd>內(nèi)容</dd> <dd>內(nèi)容</dd> </dl>
<table border="1px" width="500" height="300" cellpadding="0" cellspacing="0" > <caption>表頭</caption> <thead> <tr> <td colspan="4">標(biāo)題</td> </tr> </thead> <tbody> <tr> <td>1</td> <td>2</td> <td>3</td> <th>4</th> </tr> </tbody> </table>
<caption></caption>
<th></th>
用法和td一樣,標(biāo)題的文字自動加粗水平居中對齊Valign=”top | middle | bottom”
bordercolor="red"
<form action='http://www.123.com/postValue' method="post"></form>
屬性:action:處理信息<input type="text" name="userName" />
maxlength=“6” 限制輸入字符長度<input type="password" name="pwd" />
文本輸入框的屬性和密碼輸入框?qū)傩酝ㄓ?br><input type="radio" name="gender" value="男" checked="checked"/>男<br /><input type="radio" name="gender" value="女" />女<br />
只有將name的值設(shè)置相同的時(shí)候,才能實(shí)現(xiàn)單選效果。<input type="checkbox" name="sing" />唱歌<input type="checkbox" name="eat" />吃飯<input type="checkbox" name="game" />玩游戲
checked=”checked” 設(shè)置默認(rèn)選中項(xiàng)<select name="city"> <optgroup label="浙江省"> <option>杭州市</option> <option>洛陽市</option> <option>信陽市</option> <option>南陽市</option> </optgroup> </select>
multiple=“multiple” 將下拉列表設(shè)置為多選項(xiàng)<optgroup></optgroup>
對下拉列表進(jìn)行分組。<textarea name="introduce" cols="20" rows="5"> </textarea>
cols 控制輸入字符的長度。<input type="file" multiple="multiple" accept="application/msword" />
multiple=“multiple” 多選<input type="submit" value="注冊" />
具有提交功能<input type="button" value="按鈕" />
普通按鈕,一般配合js使用<input type="image" src="img/34.jpg" width="100" />
重置按鈕<input type="reset" value="重置" />
將信息重置到默認(rèn)狀態(tài)<form> <fieldset> <legend>注冊</legend> </fieldset></form>
<fieldset></fieldset>
對表單信息分組<legend></legend>
表單信息分組名稱<input type="url" /> 網(wǎng)址輸入框<input type="date" /> 日期控件<input type="time" /> 時(shí)間控件<input type="email" /> 郵件輸入框<input type="number" step="2" /> 數(shù)字,step:步長<input type="range" /> 滑塊控件還有很多其他的控件
例如:<form action="register.jsp" method="get"> <fieldset> <legend>注冊</legend> 用戶名:<input type="text" name="userName" value="yzq" /><br /> 密碼:<input type="password" name="pwd" /><br /> <input type="checkbox" name="sing" />唱歌 <input type="checkbox" name="eat" />吃飯 <input type="checkbox" name="game" />玩游戲<br /> <input type="radio" name="gender" value="男" checked="checked"/>男<br /> <input type="radio" name="gender" value="女" />女<br /> <select name="city" multiple="multiple"> <option>杭州市</option> <optgroup label="浙江省"> <option>杭州市</option> <option>洛陽市</option> <option>信陽市</option> <option>南陽市</option> </optgroup> </select> <br /> <textarea name="introduce" cols="20" rows="5"> </textarea><br /> <input type="file" multiple="multiple" accept="application/msword" /> <input type="submit" value="注冊" /> <input type="button" value="按鈕" /> <input type="image" src="img/34.jpg" width="100" /> <input type="reset" value="重置" /> <input type="url" /> <input type="date" /> <input type="time" /> <input type="email" /> <input type="number" step="2" /> <input type="range" /> </fieldset></form>
關(guān)鍵詞:基礎(chǔ),學(xué)習(xí)
客戶&案例
營銷資訊
關(guān)于我們
微信公眾號
版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。