10-day training (java web) and 10-day training javaweb

Source: Internet
Author: User
Tags html comment

10-day training (java web) and 10-day training javaweb
I. Basic html tags

Html is a web page creation language ,. In fact, html is similar to java and other languages. They all have their own language expressions, which are formed by tags. There are two types of tags: single tag and dual tag. They are easy to understand and are purely memory-based and mainly used when and where to use them, this will display a more beautiful page.

1. Basic html Mode

<Html> 

2. Common html tags

Outline level title label

 

Section label <p> </p>

Character tag: bold <B> </B> italic <I> </I> underline <u> </u> top tag <sup> </sup> bottom tag <sub> </ sub> strikethrough <del> </del>

Image Tag , for example, for details of width and height, see -----> full manual for creating webpages)

Hyperlink label <a href = "*. html"> </a>. You can directly enter the URL for href. When you want to link to a specific location on this page, you want to write the location as an example: <a name = "c8"> </a> and then set the link: <a href = "# c8"> </a> (bookmarks) (highlights)

<Html> 

Metadata tag <meta/>: Describes the attributes of an html webpage document, such as the author, period, and time, Web tracking, keywords, and Web page refresh. Should appear in

<Head> <title> CSDN-Online home for developers </title> <meta name = "keywords" content = "CSDN, developers, programmers, technical communities ,. NET technology, software development, programming, blog, Developer, Programmer "/> <meta name =" description "content =" CSDN is a high-quality network media and community oriented to software developers, CSDN ...... "/> </Head>

Horizontal separator label

<P> This is the upper part of the document </p> 

Note: 1. Enter a space in the webpage. If you press the Space key directly, only one space will be displayed no matter how many spaces you press. & nbsp;

2. The section label <p> </p> will generate a blank line between the paragraphs, but the line feed label <br/> will not

Ii. Tables and lists (key points)

1. Table labels

<Html> 


You can also add a table title label <caption> </caption>

2. Merge Cells

In <tr> </tr> and <td> </td>, the colspan and rowspan attributes control the number of merged rows and columns, as well as the align attribute) and valign (vertical position) to control the location of the table content (placed in the tag <td> </td>)

<Table border = "1" width = "250px"> <tr> <td rowspan = "2" valign = "top"> cells </td> <td align = "center "> cell </td> <td align =" right "> cell </td> </tr> <td colspan =" 2 "> cell </td> </tr> </table>



3. List

Ordered list <ol> </ol>, and then create a list item through <li> </li>; unordered list <ul> </ul>. In general, order means that a serial number 1234... can be automatically generated before each column, while disorder means a vertex.

4. Special characters and comments

Space & nbsp;
Yu no. & gt;
Yu no. & lt;
Double quotation marks & quot;
And Symbol & amp;
Copyright & copy;
Registered Trademark & reg;
HTML comment <! -- Comment content -->

5. Insert multimedia into html documents

Insert Background music: <bgsound src = "music/xxx.mp3" loop = "1"/>

Insert FLASH: <embed align = "center" height = "400" width = "500" src = "flash/fish.swf"/>

Insert video: <embed align = "center" height = "400" width = "500" src = "video/xxx. asx"/>

3. Form and form elements

1. form <form> </form>: used to create a form. It is used as a container for a group of form data and is not visible on the webpage. Personal Understanding: it mainly depends on whether you need to submit and reset a certain data segment (you may not understand it now, but you will know it as soon as you continue), and you need to use a form, that is to say, to regard a part of data on a webpage as a whole, you need to reset and transmit the data. (Note: Do not write form as from)

2. form elements

Text Box, password box, single-choice button, check box, file domain, hidden domain, submit button, reset button, custom command button, image button, multi-line text domain, list box (drop-down box)

Each element has its own attributes. This can be found in the Manual.

<Html> 


4. The framework set and framework generally contain web pages composed of multiple frameworks, but the results seem to have been formed. In other words, a webpage is divided into multiple modules, that is, multiple webpages, such as upper, lower, and left pages, to avoid the trouble of switching between multiple webpages. Email is a good example. You can click on the left to display relevant content on the right.
<Html> 1. nested framework set, that is, it can be split multiple times.
<frameset rows="*,50"><frameset cols="150,*"><frame src="left.html" /><frameset rows="80px,*"><frame src="top.html" /><frame src="middle.html" /></frameset></frameset><frame src="bottom.html" /></frameset> 
Result:

2. jump between frames through hyperlinks. First, set the attribute name = "a" in the frame ", then, you can set the target = "a" attribute in the hyperlink to achieve the link. You can also set the default jump target through the <base/> tag, that is, if the link without the target attribute is set, the default link is the target corresponding to the <base/> tag. (Note: This label is placed in 1. selector (that is, how to set the style) a. html selector: use the name of the html tag as the selector
<style type="text/css">h1{text-align:center;font-size:18pt;}input{border:1px solid gray;background-color:#fedcba;color:blue;}a{text-decoration:none;}</style>

B. class selector: classifies Multiple labels that should share the same appearance as one type.
<style type="text/css">.txt{border:1px dashed gray;background-color:#fedcba;color:blue;height:20px;}.btn{border:1px solid blue;background-color:#cccccc;color:red;font-weight:bold;}</style>

C/. id selector: customizes the appearance of a specific tag on the page.
<style type="text/css">td{border:1px solid blue;}#mytable{width:260px;border-width:5px;border-style:double;border-color:gray;border-collapse:collapse;}#mytd{background-color:#fedcba;text-align:center;font-size:16px;font-style:italic;}</style> 

2. Attribute backgrounds, borders, text, fonts, etc. of common css styles VI. Simple database operations 1. Database tabulation
Create table indicates (
Field name data type,
Field name data type,
.......
Field name data type,
Field Name Data Type
)
Explanation:
Field name: casually written
Data Type:
Varchar character
Varchar (20) indicates that a variable string can store up to 20 characters
Char (10) indicates a fixed string with 10 characters in size.
Int integer
Float
Create table student (
Sid int,
Sname varchar (50 ),
Sage int,
Ssex char (2 ),
Score int,
Address varchar (1, 200)
)

2. Add data
Insert into table name values (value, value ,... value); // insert data into the table name (column name, column name ,... column name) values (value, value ,... value); // insert data into a specified column in the Table. Interpretation value: numeric type, single quotation marks
Insert into student values (1, 'zhang san', 20, 'mal', 90, '51 route ');
Insert into student (sid, sname, ssex) values (2, 'wang wu', 'female ');
2. Modify
Update table name set column name = new value, column name = new value... column name = new value; // modify all data in the table
Update table name set column name = new value, column name = new value... column name = new value where condition;
Example:
Update student set sage = 25, address = 'furong route' where sid = 2
3. Delete
Delete table name; // delete all data in the table
Delete table name where condition; // delete data with specified conditions
Example:
Delete student where sid = 2;
4. Query
Select * from table name; // query all data in the table
Select * from table name where condition; // query the data of the specified condition in the table
Select column name, column name .. column name from table name; // query the data of the specified column in the table

7. For database links, see a small web page.

Download link

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.