Html/css Starting from scratch-html Foundation (i)

Source: Internet
Author: User
Tags html header word wrap

first, web standards1.1 Structure

(1) XHTML (extensible Hypertext Markup Language) Extensible Hypertext Markup Language
(2) World Wide Web Consortium WWW Alliance

A, the structure (XHTML, XML), Performance (CSS), standards.

1.2 Performance

(1) CSS (cascading style sheets) cascading style Sheets

1.3 Behavior

(1) ECMA (Europan Computer Manufactures association) European Federation of Computer Field dealers
A, the behavior DOM (Document object model) text object models have been developed
B, ECMAScript Standard

second, the HTML basic structure

<!doctype html>

<meta charest= "Utf-8" > <!--encoded format-
<title></title>
<body>
.
.
.
<p></p> <!--paragraphs--
</body>

three, basic grammar3.1 General Markings

< tag Attribute 1 = "Property value 1" Property 2 = "Property value 2" ></tag >
As follows:
<strong></strong> <b></b> <!--bold---
<em></em> <i></i> <!--tilt-to-

3.2 Empty Tags

< tag attribute = "attribute value"/>
As follows:
<br/> <!--line-wrap-
<!--inserting pictures-

&nbsp; spaces

iv. Common Markings (labels)

4.1 List

A, ordered list
<ol> ordered
<li></li>
<li></li>
<li></li>
</ol>

B, unordered list
<ul> unordered
<li></li>
<li></li>
<li></li>
</ul>

C, custom list
<dl> definition List
<dt> is explained </dt>
<dd> Interpretation </dd> Definition description
</dl>

Note: DD can be repeated, but DT only allows one;
There are sequence tables in the parameters tyle= "A", start= "3",//The first sequence starting from C.

4.2 Picture Tags

4.3 hyperlinks

<a href= "path address" target= "_blank" ></a>

The path is divided into: absolute path (https//www.baidu.com), relative path (images/inder.html).
Target default property value is _self;_blank to open a new window

4.4 Block Label

<div></div>
Description: A, block between the automatic line-wrapping
b, if the div block is wide, high, the content is Chinese, word wrap, if it is not wrapped in English, will overflow.
<span></span>
Description: A, span block does not wrap, width height can not be limited, with the length of the text changes.

4.5 Table Labels

1, Syntax: <table width= "" height= "" border= "1 (table box pixels)" bordercolor= "table box color" cellspacing= "0 (cell spacing)" cellpadding= "content away from the left border pixels" >
2, description; When the table is given a wide height, the table is cellpadding when the given width exceeds the set width.
<tr>
<th><th>
<th><th> <!--th header is thicker--
<th><th>
</tr>
<tr>
<td><td>
<td><td> <!--TD Cell, TR-line
<td><td>
</tr>

3. Cell Merge Properties
colspan merge Columns
rowspan Merge Rows
Syntax: rowspan= "3"//merge three rows

4. Forms

A, form box
Syntax: <form name= "form name" method= "Post/get" action= "" ></form>
Description

B, text box
<input type= "text" value= "Default value"/>

C, Password box
<input type= "Password" placeholder= "message"/>

D, Radio Box
<input type= "Radio" name= "self-naming (consistent, must write)"/>
As follows:
<input type= "Radio" name= "Sex" value= "male"/> Male
<input type= "Radio" name= "Sex" value= "female"/> Female

E, Multi Box
<p> Mate Criteria </p>
<input type= "checkbox" Name= "Boy" value= "185"/>185
<input type= "checkbox" Name= "Boy" value= "Black"/> Black
<input type= "checkbox" Name= "Boy" value= "male"/> Male
<input type= "Chechbox" name= "Boy" value= "Northeast"/> Northeast

disabled= "Disabled" (disabled, Forbidden)
Checked= "Checked" (selected by default)
F, reset
(1) <input type= "reset" value= "Default"/> (reset, empty the above data)
G, Button
(1) <input type= "button" value= "Just take a jump, don't mention submit"/>
(2) <input type= "Submit" value= "both jump and submit"/>

Description: Button as label when <button> button </button> both jump and submit

h, drop-down list
(1) <select name= "" >
<option></option>
<option></option>
</select>

I, Text field
<textarea cols= "width" rows= "Number of rows" Name= "" >
</textarea>

Indicate:
(1) The above text box is placed in form form;

(2) What is the difference between the attribute value Post/get of a property method in a form?
A, get is to obtain data from the server, post is to send data to the server;
b, get is to add the parameter value to the property of the action to submit the form refers to the URL, the value and the form of each field one by one corresponding to, in the URL can be seen,
Post is the URL to the Action property that the user cannot see by using the http,post mechanism to place the individual fields within the form and their contents in the HTML header.
c, for Get mode, the server side of the reqestquerystring gets the value of the variable, for the post-mode server with Request.Form to obtain the submission data.
D, get a small amount of data transfer volume is not larger than 2kb,post, generally unrestricted
F, get security low, post security high, but high transmission efficiency

(3) The use of value in input
A, type= "button"/"Reset"/"Submit", indicating the text on the button
B, type= "text"/"password";
C, type= "Check"/"Radio" definition and input related values

(4) Form nesting
<table>
<form>
<tr>
<td><input type= "text" placeholder= "Fill in User name" ></td>
<td><input type= "password" placeholder= "Please enter password" ></td>
</tr>
<tr>
<td><input type= "button" value= "Forgot password?" "></td>
<td><button> Login </button></td>
</tr>
</form>
</table>








Html/css Starting from scratch-html Foundation (i)

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.