Html&javaskcript&css&jquery&ajax (iii)

Source: Internet
Author: User
Tags table definition

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.