1. 程式人生 > >HTML&javaSkcript&CSS&jQuery&ajax(二)

HTML&javaSkcript&CSS&jQuery&ajax(二)

log height query 使用 get 元素 .com row center

一、HTML

1、標簽<a href="http:www.baidu.com">This is a link </a> <img src="w3cSchool.jpg" width="123" height="34" /> <!--Html元素指的是從Start tag 到 end tag的所有代碼-->

2、eg、<html> <body> <p> This is a paragraph </p> </body></html>

3、<h1 align="center" >對齊方式 <body bgcolor="yellow">背景顏色設置 , <table border="1">表格邊框設置

4、<hr/>創建水平線 eg、 <p> This is a paragraph</p> <hr/> <p>This is a paragraph</p> <br/>換行標記

5、<body style="background-color:yellow"> <h2 style="background-color:red"> This is a page<h2/> <p style="background-color:green">This is a paragraph</p>

6、<h1 style="font-family: verdana">A heading</h1> <p style="font-family:arial; color:red; font-size:20px;"> A paragraph</p>

7、<h1 style="text-align:center">This is a heading</h1 > <p> WWF 的目標是:<q>構建人與自然和諧共存的世界。</q></p> <!--引用-->

8、對於長的引用使用<blockquote cite="http://www.worldwildlife.org/who/index.html"> 五十年來,WWF一直致力於保護自然環境的未來</blockquote>

9、<address> writen by Donald Duck <br\> Visit us at: <br\> </address>

10、鍵盤標簽 <p><kbd> File |Open.......</kbd></p> 計算機代碼標簽<code> var person={ firstname:"Bill", lastName::"Gates", age:50, eyeColor:"blue"}

11、定義數學變量標簽 <p> <var>E=mc<sup>2</sup></var></p>

12、外部樣式表鏈接 <head><link rel=“stylesheet” type="text/css" href="mystyle.css"></head> 內部樣式 <head> <style type="text/css"> body{background-color:red} p{margin-left:30px}</style> </head> 內聯樣式 <p style=color: red; margin-left :30px">This is a paragraph</p>

13、鏈接<a href="url">link text</a> 使用Target屬性可以定義文檔在何處顯示 <a href="www.w3cschool.com.cn/" target="_blank">Visit W3cShool!</a>

14、圖像標簽 <img src="url"/> 替換文本屬性, <img src="boat.gif" alt="Big Boat"> 當瀏覽器無法加載圖像時提示

15、表格單元格 <table border="1"><tr><td> row1 ,cell1</td> <td> row 1 ,cell 2</td> </tr> <tr> <td> row 2, cell 1 </td> <td>row 2,cell2</td></tr> </table>

16、表頭標簽<th>Heading</th> <th>Another Heading</th> 如果表格是空的,則表格邊框不顯示,要添加占位符 <td>&nbsp;</td>

17、無序列表 <ul><li>Coffe</li> <li>Milk</li></ul> 有序列表 <ol><li>Coffe</li> <li>Milk</li></ol>自定義列表 <dl><dt> </dt></dl>

HTML&javaSkcript&CSS&jQuery&ajax(二)