導航:首頁 > 編程語言 > html5頁面代碼

html5頁面代碼

發布時間:2023-08-19 05:20:46

『壹』 HTML5的代碼有沒有大神幫我做一下

<!DOCTYPEhtml>
<html>
<head>
<metacharset="UTF-8">
<title></title>
<styletype="text/css">
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,text

area,p,blockquote,th,td{margin:0;padding:0;}
body{background:#fff;color:#555;font-size:14px;font-family:Verdana,Arial,Helvetica,sans-serif;}
td,th,caption{font-size:14px;}
h1,h2,h3,h4,h5,h6{font-weight:normal;font-size:100%;}
address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}
a{color:#555;text-decoration:none;}
a:hover{text-decoration:none;}
img{border:none;}
ol,ul,li{list-style:none;}
input,textarea,select,button{font:14pxVerdana,Helvetica,Arial,sans-serif;}
table{border-collapse:collapse;}
html{overflow-y:scroll;}

.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
.clearfix{*zoom:1;}

.publish{
margin:0auto;
width:1000px;
overflow:hidden;
}
header{
height:60px;
background:#ccc;
border-radius:5px;
text-align:center;
}
.content{
margin-top:20px;
margin-bottom:20px;
height:300px;
border-radius:5px;
}
article{
width:700px;
height:300px;
float:left;
background:#123bad33;
}
articleh3{
line-height:40px;
width:95%;
height:40px;
border-radius:3px;
margin:0auto;
font-weight:bolder;
background:#dbf;
}
articlesection{
width:95%;
margin:10pxauto;
height:240px;
background:#00ff004f;
}
aside{
height:298px;
width:248px;
float:right;
border:1pxsolid#000;
border-bottom-right-radius:5px;
border-top-right-radius:5px;
}
footer{
height:40px;
text-align:center;
line-height:40px;
font-size:12px;
background:#fda;
}
</style>
</head>
<body>
<headerclass="publish">頁頭</header>
<divclass="publishcontentclearfix">
<article>
<h3>專題標題</h3>
<section>專題內容</section>
</article>
<aside>
側邊欄
</aside>
</div>
<footerclass="publish">頁尾版權所有&;XuTel:xxxxxxxxx</footer>
</body>
</html>

Html5語義化標簽:

頭部<header>
專題文章<article>
側邊欄<aside>
尾部<footer>

『貳』 HTML5的代碼標准格式是什麼

你想問的應該是,在搭建一個HTML文件時,基本的文件結構是什麼樣子吧?

標準的HTML文件由「文檔聲明、文件頭、文件體」組成。

對於HTML5,文檔聲明也應該採取HTML5.0的聲明方式,具體代碼如下:

<!doctype html>

<html>

<head>

<meta charset="UTF-8">

<title>HTML5學堂(碼匠) &言成科技聯合出品</title>

<meta name="viewport" content="width=device-width,user-scalable=no">

<link rel="stylesheet" href="../css/reset.css">

</head>

<body>

<div>具體內容</div>

</body>

</html>

在html標簽當中包含head標簽和body標簽兩種,而head標簽表示的是文件頭,body標簽表示文件體,文件頭當中需要包含「字元編碼」(head標簽中的第一行)、「標題」(title標簽)、「其他元信息」(除了字元編碼外的其他meta),而文件體當中書寫的具體代碼就是在網頁當中會顯示的內容。

此外,在文件頭部或文件體當中還可以使用link標簽引入CSS文件,或者使用script標簽引入JS文件。

關於文檔聲明,在傳統的HTML4當中,有另外三種聲明方法,請詳見《文檔聲明 DOCTYPE常見的文檔類型》

『叄』 找一點html5寫的源代碼案例,供初學者學習

首先准備好11張圖片,放到img文件夾下供調用

閱讀全文

與html5頁面代碼相關的資料

熱點內容
win10文件比率是什麼 瀏覽:652
msdb資料庫置疑 瀏覽:210
移動花卡免流app為什麼要10元 瀏覽:147
xamppphp配置文件 瀏覽:268
刪除ghost文件 瀏覽:642
蘋果7可置換地方 瀏覽:763
win10騰訊文件夾在哪裡 瀏覽:262
在網站前面加什麼可以看會員視頻 瀏覽:908
哪個讀書app支持格式最全 瀏覽:322
魅族mx3提示網路可能會受到監控 瀏覽:308
如何判斷復制文件是否完整 瀏覽:803
qq接收的語音文件在 瀏覽:408
手機qq禁止查看動態 瀏覽:923
如何用編程求解二重積分 瀏覽:366
在桌面上搜索不到文件夾 瀏覽:723
中外文專利網站有哪些 瀏覽:682
尖刀車端面槽怎麼編程 瀏覽:70
電腦重裝會把所有文件都刪掉嗎 瀏覽:982
java匿名內部類構造函數 瀏覽:573
如何ftp文件到linux 瀏覽:894

友情鏈接