First, HTML block elements
1, block-level elements block levels element, inline elements inline element, html<div> elements belong to block-level elements, he is a container for combining other HTML elements, when used with CSS <div> element is used to set style properties on large content blocks. <div> for document layout,
2. HTML <span> element is an inline element, a container for text, a class of <div> elements, and the ability to set the same class for the same <div> element
<! DOCTYPE html>
<style>
. cities{
Background-color:green;
Color:black;
margin:20px;
padding:20px;
}
</style>
<body>
<div class= "Cities" >
<p>london is the capital ciry of england.<br/>
It's the most populous city in the kingdom<br/>
With a metropolitan qrea of over million inhabitants<br/>
</p>
</div>
3, the element inside the branch, the html<span> element is the inline element, can scope the text container, the set <span> element class, can set the same style for the same <span> hidden danger su.
<! DOCTYPE HTML >
4, using the <div> element HTML layout, to be able to locate the CSS
<! DOCTYPE html>
<style>
#header {
Background-color:black;
Color:white;
Text-align:center;
padding:5px;
}
#nav {
line-height:30px;
Background-color: #eeeeee;
height:300px;
Float:left;
padding:5px;
}
#nac {
line-height:30px;
Background-color: #eeeeee;
height:300px;
Float:right;
padding:10px;
}
#section {
width:350px;
Float:left;
padding:10px;
}
#footer {
Background-color:black;
Color:white;
Clear:both;
Text-align:center;
padding:5px;}
</style>
<body>
<div id= "Header" >
</div>
<div id= "NAV" >
London<br>
Paris<br>
Tokoy<br>
</div>
<div id= "NAC" >
Asia Ming <br>
Qian Qian <br>
Love You <br>
</div>
<div id= "section" >
<p>
London is the capital city of England. It's the most populars city in the
Kingdom, with a metropolitan area of over million inhabitants.
</p></div>
<div id= "Footer" >
Copyright w3cschool.com.cn</div>
</body>
5. HTML table Definition
The function of the <table> element is to display tabular data.
Use the <table> element to get layout effects, styling table elements with CSS
<! DOCTYPE html>
<style>
table.lamp{
width:100%;
broder:1px solid #d4d4d4;}
Table.lamp th td{
padding:10px;}
Table.lamp td{
width:100px;
}
</style>
<body>
<table class= "lamp" >
<tr>
<th>
Style= "height:200px;width:200px" ></th>
<td> the table element is not a designed to is layout tool</td></tr></table>
</body>
Html&javaskcript&css&jquery&ajax (iii)