基本結(jié)構(gòu):
!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd html head meta http-equiv= Content-Type content= text/html; charset=UTF-8 title /title /head body /body /html
2.文檔類型:
(1)HTML 4.01
!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd
(2)HTML5
!DOCTYPE html
(3)XHTML 1.0
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
3.頭部:
(1)字符集
meta http-equiv= Content-Type content= text/html; charset=UTF-8
(2)引入JS
script language= javascript /script script language= javascript src= /script script language= javascript var u= __URL__ var a= __APP__ /script script language= javascript src= __PUBLIC__/js/jquery-1.8.1.min.js /script
(3)引入CSS
復(fù)制代碼
代碼如下:
style type= text/css /style link rel= stylesheet href= type= text/css
(4)設(shè)置默認(rèn)跳轉(zhuǎn)
base href= / base target= _blank /
(5)設(shè)置搜索引擎相關(guān)信息
meta name= description content= ,, / meta name= keywords content= ,, /
4.主體:
(1)基本內(nèi)容
body onload= div id= >(2)表單
GET方式提交:form id= action= method= post /formPOST方式提交:
form id= action= method= get /form
攜帶文件提交:form id= action= method= post enctype= multipart/form-data /form
首頁常用:文本域: input id= name= >相信看了這些案例你已經(jīng)掌握了方法,更多精彩請關(guān)注php 其它相關(guān)文章!
相關(guān)閱讀:
怎樣通過disabled和readonly將input設(shè)置為只讀效果
meta的標(biāo)簽有哪些作用
HTML的頭標(biāo)簽meta如何實現(xiàn)refresh重新定向
html的form內(nèi)部標(biāo)簽應(yīng)該如何使用
以上就是常用html元素結(jié)構(gòu)有哪些的詳細(xì)內(nèi)容,html教程
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。
新聞熱點
疑難解答