html筆記,html學習筆記

來源:互聯網
上載者:User

html筆記,html學習筆記

http-equiv 屬性為成對的名稱和數值提供了名稱。並指示伺服器在發送實際的文檔之前先在要傳送給瀏覽器的 MIME 文檔頭部包含成對的名稱和數值。

當伺服器向瀏覽器發送文檔時,會先發送許多成對的名稱和數值。雖然有些伺服器會發送許多這種成對的名稱和數值,但是所有伺服器都至少要發送一個:content-type:text/html。這將告訴瀏覽器準備接受一個 HTML 文檔。

使用帶有 http-equiv 屬性的 <meta> 標籤時,伺服器將把成對的名稱和數值添加到發送給瀏覽器的內容標題部  meta name keywordsmeta是html語言head區的一個輔助性標籤。幾乎所有的網頁裡,我們可以看到類似下面這段的html代碼:  <head>  <meta http-equiv="content-Type" content="text/html; charset=gb2312">  </head>  也許你認為這些代碼可有可無。其實如果你能夠用好meta標籤,會給你帶來意想不到的效果,例如加入關鍵字會自動被大型搜尋網站自動搜集;可以設定頁面格式及重新整理等等。  一、meta標籤的組成  meta標籤共有兩個屬性,它們分別是http-equiv屬性和name屬性,不同的屬性又有不同的參數值,這些不同的參數值就實現了不同的網頁功能。  1、name屬性  name屬性主要用於描述網頁,與之對應的屬性值為content,content中的內容主要是便於搜尋引擎機器人尋找資訊和分類資訊用的。  meat標籤的name屬性文法格式是:<meta name="參數" content="具體的參數值"> 。  其中name屬性主要有以下幾種參數:  A、Keywords(關鍵字)  說明:keywords用來告訴搜尋引擎你網頁的關鍵字是什麼。  舉例:<meta name ="keywords" content="science, education,culture,politics,ecnomics,relationships, entertaiment, human">  B、description(網站內容描述)  說明:description用來告訴搜尋引擎你的網站主要內容。  舉例:<meta name="description" content="This page is about the meaning of science, education,culture.">  C、robots(機器人嚮導)  說明:robots用來告訴搜尋機器人哪些頁面需要索引,哪些頁面不需要索引。  content的參數有all,none,index,noindex,follow,nofollow。預設是all。  舉例:<meta name="robots" content="none">  D、author(作者)  說明:標註網頁的作者  舉例:<meta name="author" content="bluebox,web@7dspace.com">   特殊字元 < :&lt; >:&gt; 空格:&nbsp;     <head>有: 1<title></title>網頁標籤名稱 2<meta http-equiv=“content-type” content=“text/html;charset=utf-8”/> <meta name=“keywords” content=“html,css”/> 3<style type=“text/css”>p{}</style> 4<script type=“javascript”></script> 5<link rel=“stylesheet” type=“text/css” href=“XXX.css”/>告訴程式:哥要準備寫css了!Rel是relationship的英文縮寫,它描述了當前頁面與href所指定文檔的關係;stylesheet就是樣式表的意思;CSS是 Cascading Style Sheet(階層式樣式表)的縮寫 htmlheadbody     header     nav     section也可以在aside下面     article     aside     footer 屬性與屬性空格屬性值之間分號 標記,元素,屬性,屬性值XHTML嚴謹,HTML5相容性 HTML 5<!DOCTYPE HTML>b,i,u,s,sub,sup塊分區<div style=“color:blue;">p /div行內分區<span style=“"><p align=“"><body text=“red” bgcolor=“”><!——--><hr align width=“50%” color size=“3”/><img src width height><a href=“X.zip/mailto:X@X/頂部的空連結#/javascript:XX/X.asp" target=“_blank或_self"錨點1.定義錨點<a name=“anchorname1”>文本1</a>2.串連到錨點<a href=“#anchorname1>文本2</a> <table width/height/align表格邊框粗細/border=“1” 內邊距cellpadding=”” /外邊距即儲存格之間的距離cellspacing=“” /bgcolor><tr align=“left/right/center” valign=“top/middle/bottom”><td align align width height 跨列colspan 跨行rowspan>表格標題<caption>只1個且緊跟<table>,預設置中表頭<thead>表主體<tbody>表尾t<tfoot><table><caption><th>     <tr>     <td rowspan/colspan=“"><tbody>     <tr>     <td rowspan/colspan=“"><thead/tfoot>     <tr>     <td rowspan/colspan=“"> 列表<ol type=“清單類型1/a/A/i/I” start=“起始編號3”><ul type=“disc預設的實心圓/circle空心圓/square實心矩形>dl列表     dt術語     dd術語的具體定義     表單<form action method enctype name=“">     <input type value name disable/>     <input type=“text/password” 名稱name=“” 訪問者自由輸入的仁義文本value=“” maxlength=“” readonly/>文字框與密碼框     <input type=“radio/checkbox” 設定名稱,並用於分組,一組單選框或複選框的名稱必須相同name=“” 文本,當提交form時,如果選中了此選項按鈕,那麼value就被發送到伺服器value=“” checked/>單選框和複選框     <input type="submit/reset/button” name=“” value=“按鈕上顯示的文本/>按鈕     <input type=“hidden” name=“” value=“”/>隱藏欄位這種類型的輸入元素實際上是隱藏的。這個不可見的表單元素的 value 屬性儲存了一個要提交給 Web 服務器的任一字元串。如果想要提交並非使用者直接輸入的資料的話,就是用這種類型的元素。     <input type=“file” name=“”/>檔案選擇框 <input type=“checkbox” name=“A” id=“A”/><label for=“A”>文字</label>點擊文字等於點擊checkbox 選項框<form action method enctype name=“"><select name=“”選項框命名 size=“”大於1,則為滾動列表;顯示幾個 multiple=''>     <option value selected>選項文字</option> <form action method enctype name=“"><textarea name rows cols></textarea>多行文本輸入框 為控制項分組<form action method enctype name=‘'><fieldset>為控制項分組     <legend>被包圍的標題</legend>     地址:<input type=“text”/>     <br/>     郵編:<input type=“text”/></fieldset>      浮動架構:頁中頁<iframe src=“” height weight></iframe> <mark>需要高粱的文本</mark><time datetime=“2011-7-11T0:30>淩晨0點30分</time> 摘要和細節<details>     <summary>標題</summary>     <div>     發票抬頭:<input type=“text”><br/>     發票內容:<input type=“text”>     </div></details> 度量裝置1:<meter value="10" min="0" max="100" title="50"></meter>%

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.