Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537
天分享的文章和大家講過了,html就是超文本標記語言,標記其實指的就是html的那些標簽,標簽才是每一個網頁的靈魂,今天就來和大家談談html有哪些常用的主要標簽及其用途。
我們按字母順序來寫:
1、<!--.......-->,這個是注釋標簽,中間的‘.......’省略號代表被注釋的內容。
2、<!doctype>,這個是定義文檔的類型。
3、<a>,這個叫a標簽,定義超文本鏈接,什么叫超文本鏈接呢,還有什么是注釋,何為定義文本類型,這些以后的文章里都會專門給大家談一談。
4、<body>,這個是定義文檔的主體。
5、<br/>,這個是起換行作用的標簽。
6、<button>,這個是定義一個點擊按鈕。
7、<div>,定義文檔中的節。
8、<form>,定義html文檔的表單。
9、<h1><h2><h3><h4><h5><h6>,這六個是定義html的標題,其中h1的標題顯示出來的字體最大,以其類推,h6最小。
10、<head>,定義關于文檔的信息。
11、<html>,定義html文檔。
12、<iframe>,定義內聯框架。
13、<img>,定義圖像。
14、<input>,定義輸入控件。
15,<label>,定義input元素的標注。
16、<li>,定義列表的項目。
17、<link>,定義文檔與外部資源的關系。
18、<meta>,定義關于文檔的元信息。
19、<ol>,定義有序列表。
20、<option>,定義選擇列表中的選項。
21、<p>,定義段落。
22、<pre>,定義預格式文本。
23、<script>,定義客戶端腳本。
24、<select>,定義選擇列表(下拉列表)。
25、<span>,定義文檔中的節,注意和<div>標簽的區別。
26、<style>,定義文檔的樣式信息。
27、<table>,定義表格。
29、<td>,定義表格中的單元。
30、<textarea>,定義一個多行的文本輸入控件。
31、<title>,定義文檔的標題。
32、<tr>,定義表格中的列。
33、<ul>,定義無序列表。
上面這些就是比較常見的html標簽和它們的用途了。
今天就整理到這里了,明天再和大家談一下標簽的一些其他相關信息。
三部分 附錄(因為暫時不支持插入超鏈接所以部分內容無法顯示)
附錄一 DIV命名規范
附錄二 CSS精靈
a { display:block; width:200px; height:65px; line-height:65px; /*定義狀態*/ text-indent:-2015px; /*隱藏文字*/ background-image:url(button.png); /*定義背景圖片*/ background-position:0 0; /*定義鏈接的普通狀態,此時圖像顯示的是頂上的部分*/ } a:hover { background-position:0 -66px; /*定義鏈接的滑過狀態,此時顯示的為中間部分,向下取負值*/ } a:active { background-position:0 -132px; /*定 義鏈接的普通狀態,此時顯示的是底部的部分,向下取負值*/ }
附錄三 一些tips解決方案
頁面優化實踐
寫DIV+CSS 的一些常識
常用代碼片段
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, 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:underline; } img { border:none; } ol,ul,li { list-style:none; } input, textarea, select, button { font:14px Verdana,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; }
<meta name=”viewport” content=”width=320,target-densitydpi=dpi_value,initial-scale=1, user-scalable=no”/>
table-layout: fixed; word-break: break-all;;border-collapse: collapse
<div id=”abc” style=”display:table;text-align:center;width:100%;height:100%;”> <span style=”background:#f00; display:table-cell; vertical-align:middle;”> <input type=”button” value=”item1″ /> </span> </div>
filter:alpha(opacity=50); /*1-100*/ -moz-opacity:0.5; /*0-1.0*/ -khtml-opacity:0.5; /*0-1.0*/ opacity:0.5; /*0-1.0*/
white-space:nowrap; text-overflow:ellipsis; overflow:hidden;
.fix{zoom:1;} .fix:after{ display:block; content:'clear'; clear:both; line-height:0; visibility:hidden; }
一些總結
一些概念
學習從來不是一個人的事情,要有個相互監督的伙伴,想要學習或交流前端問題的小伙伴可以私信“學習”小明加群獲取2019web前端最新入門資料,一起學習,一起成長!
上大學時,c語言似乎很流行,很多專業的人都開這個課,所以從那時候開始接觸計算機語言之類的東西。可惜的是在學校時根本沒有時間去深究它,一直是自己的一個遺憾。
一直到2011年的時候,才又拿起書來自學,當時一個大學最要好的同學剛好在自學網站開發,我們在一起探討的時候,向我推薦了前端開發,所以從那時候開始學習html,css,div,javascript,jquery,mysql,php,http...再到后來的bootstrap,vue,angular...從現在開始,我準備從最簡單的開始一步步地給大家分享一下,今天就先簡單的介紹一下html相關知識。
html英語全稱是HyperText Markup Language,中文意思是超文本標記語言。從字面上的意思我們也能理解,這是一種采用標記來進行表達的語言,并且不是普通隨便的標記,而是定義了一系列特定的有規范的字母,數字,符號做為標記,所以說把它稱為超文本。然后通過html我們可以做出一個個所需要的網頁頁面來。
今天就簡單說到這里,明天再和大家分享一下具體的標記及相關知識。
*請認真填寫需求信息,我們會在24小時內與您取得聯系。