HTML Basics-Episode

Source: Internet
Author: User

HTML Basic Learning

1: When we add images on the Internet it is best to thumbnail, rather than limit the size of the image directly in the code. You can reduce traffic for users. alt= "" attribute is to let the picture in reality not come out of the text, title= "" is our mouse on the picture above the display.

2: The border is labeled style= "border:1px solid red;";

If we just write a border here, but the default is to set the color of the border to white, but the back of the solid red color is set to red.

3: The <meta/> tag that we set in the

    1. <meta http-equiv= "content-type" content= "text/html;charset=utf-8"/>

4: Ordered list

<ol>

<li> Hello </li>

<li> I'm good </li>

<li> He's good </li>

<li> World Good </li>

</ol>

The default format for this is: 1234, we can modify the previous order by the property type.

If you place it in type= ' I ' the front is capitalized.

5: About Forms <table></table>

Some regular knowledge points we should know,<tr> represents a row,<td> represents a column. There are two properties that we need to know, cellspacing: represents the spacing between tables, and cellpadding represents the amount of space inside each table.

  1. <table border= "1" width= "height=" >
  2. ? <tr>
  3. ???? <td>1</td>
  4. ???? <td>2</td>
  5. ???? <td>3</td>
  6. ? </tr>
  7. ? <tr>
  8. ???? <td>1</td>
  9. ???? <td>2</td>
  10. ???? <td>3</td>
  11. ? </tr>
  12. </table>

This is just the beginning of the style, it is such a son. We add attributes cellspacing and cellpadding and then look.

First add cellspacing= "20 below, we find that the spacing between each small table changes,"

This effect we know the function of the CellSpacing property, and the CellPadding property is the distance to adjust the contents of the table.

We can see that the numbers inside it change, and that each number is a certain distance from the inside. and border= "1" is the thickness line that represents the border.

To merge Cells:

The final effect is achieved by colspan= "numbers" and rowspan= "numbers". The number here is the relative position between the cells we need and the cell, the position is a few, the number is just a few words on the line.

Horizontal alignment: Align:left.right.center.

Vertical alignment: Valign:top.middle.bottom

The center of the table has a Algin property, which is written in <table>, indicating that the table is all centered.

6: Form form

<form> tags are form labels, and if a data submission server is required, you need to place the form elements <input><textarea><select> and so on into the form. Optional values for type: Submit (Submit button) file (File selection box), Image (Picture button), Password (password box), Radio (radio button), Reset (reset button), text (text box), about form, We know that only form elements can have name, and name can be duplicated. The property of name is to commit the data and our ID attribute is intended primarily for the client, which can manipulate an element through the JS language.

There is no data type for 7:html, so there is no ture,false to say. We can set a property to read-only property, that is, add the property readonly= "ReadOnly", that is, let it not enter a value, you can also set it to disable the property, disabled= "disabled"; the disabled label is not committed to the server, read-only can be committed.

8:get method submission is to encapsulate the data into a & connection key-value pairs, through the browser's address bar, submitted to the server, because it requested the address length is limited, so it is not possible to submit the file by the Get method, and it is very insecure in the URL, For the post submission is encapsulated in the data packet, generally cannot see the data, is in the format of the message to the server to send things. The format is also connected in the form of a key-value pair in &, which is no longer in the browser's URL, and is safe in comparison. But people through the general tools can also intercept the data, we want to be safe, we must use the HTTPS protocol to submit, this is safe, because he has encrypted the message before encapsulation, even if the data is obtained, but also encrypted data.

9: Picture scrolling effect. <marquee></marquee>

This tab allows you to scroll through the image. The property inside has a direction= "direction" setting its direction of scrolling. Behavior whether to set it to a single time or to scroll back and forth. Scrolldelay: The speed of scrolling, in milliseconds, the default is 85.

10:<div>,<span> are boxes that are blocks, layers of stuff that can be designed. By putting elements into a div for uniform setup, we can do a simple partial design with <div>. It is convenient to use CSS.

HTML Basics-Episode

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.