2018-3-13
搭建http-sever本地開發(fā)環(huán)境
1.安裝http-server-------在命令行中輸入npm install –g http-server
2.進入自己創(chuàng)建的文件夾要進行掛起的http文件
3.在命令行中執(zhí)行http-server –c-1
4.在瀏覽器中打開命令返回的IP地址
5.退出掛起Ctrl+c
6.刷新瀏覽器Ctrl+r
認識http
什么是HTTP
超文本標記語言
擴展名
.htm/.html
http結(jié)構(gòu)
<!DOCTYPE html> 文檔類型聲明
<html> 文本描述網(wǎng)頁
<head> 文檔頭部信息
<meta charset="UTF-8"> UTF-8編碼
<link rel="shortcut icon" href="路徑" type="image/x-icon"> icon圖標
</head>
<body> 網(wǎng)頁的可見內(nèi)容
<h1>一級標題</h1> 一級標題
<blockquote>引用內(nèi)容<blockquote> 引用內(nèi)容
<p>段落</p> 段落文字
<img src="圖片路徑" height="高度" alt="文字修飾"> 圖片
<a href="跳轉(zhuǎn)目標路徑">綁定鏈接對象</a> 鏈接
</body>
</html>
注意:空白(空格 Tab 換行)
???????????標簽可以嵌套
注釋
<--注釋內(nèi)容-->
例子:文章結(jié)構(gòu)美化
1.進入git官網(wǎng)
2.輸入框中查找搜索github markdown css
3.點擊 sindresorhus/ github markdown
4.點擊CDNJS
5.復制第一條
https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/2.10.0/github-markdown.css
6.在head中使用link標簽
<link rel="stylesheet" >
7.復制style標簽粘貼head中
.markdown-body {
box-sizing: border-box;
min-width: 200px;
max-width: 980px;
margin: 0 auto;
padding: 45px;
}
@media (max-width: 767px) {
.markdown-body {
padding: 15px;
}
}
8.復制class="markdown-body"粘貼于body中精居,即
<body class="markdown-body">
html5是什么
是html的最新版本:文檔類型聲明* 語義化的標簽 *(歷史了解)