HTML Beginner (These two days with a girl to write div+css, always feel that she understands the way is not very right)

Source: Internet
Author: User

First of all, I am also a halfway decent monk, there may be some places that are not in place, just a personal point of view.

I remember when I learned this piece of content in Beijing when a company to work, then no one with study, people said the site, and then began to see, according to the contents of the code, every night knocked to Lincheng 3 points, and then understand the role of each label (may say that the non-standard), Then one by one look at the properties of the tag. One of the first pages I wrote on my own was to write a resume with table.

Code:

<!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"Xml:lang= "en"><Head>    <Metahttp-equiv= "Content-type"content= "Text/html;charset=utf-8">    <title>Personal Resume</title></Head><Bodybgcolor= "#BBFFFF">    <Center><H2>Personal Resume</H2></Center>    <Tablecellpadding= "0"cellspacing= "0"Border= "1px"width= "800px"Height= "600px"Align= "Center">        <TRAlign= "Center"Height= "50px">            <TD>Name</TD><TD>Strip_liu</TD><TDrowspan= "4">Photo Area</TD>        </TR>        <TRAlign= "Center"Height= "50px">            <TD>Gender</TD><TD>Man</TD>        </TR>        <TRAlign= "Center"Height= "50px">            <TD>Phone</TD><TD>180xxxxxxxx</TD>        </TR>        <TRAlign= "Center"Height= "50px">            <TD>E-Mail</TD><TD>[Email protected]</TD>        </TR>        <TR>            <TDAlign= "Center">Work experience</TD><TDcolspan= "2">When I was in college ...</TD>        </TR>        <TR>            <TDAlign= "Center">Personal Introduction</TD><TDcolspan= "2">My name is xxx, ...</TD>        </TR>        <TR>            <TDAlign= "Center">Hobbies and Interests</TD><TDcolspan= "2">I like chess ...</TD>        </TR>    </Table>    <Center><ahref= "It was written in the QQ space address">My space.</a></Center></Body></HTML>

This code strictly speaking, still have a problem, because at that time although already know div this thing, but do not know how to use, the thought of doing a resume, the first thought is table table, because this is the form of the form, as long as their own a slightly merged cell is OK.

Let's talk about the code here. I didn't know the center tag had been discarded after writing it.
Here in the body directly add the color of Beijing, that is, the bgcolor property, table in the cellpadding-a distance representing the extra surface of the cell, used to separate cells and cell space, which is generally set to 0,cellspacing cell spacing table spacing-- Represents the distance between the table border and the cell filter, which is also the distance between the cell filters and is generally set to 0;
Border properties generally have a block element, but some settings show that some settings are not displayed, border general usage is border: width solid line/dash color; width and height are set to the entire table width and altitude; Of course, in any block element (label), Width and height are all set to a wide height.
TR is a row element, that is, a pair of tr tag is a row, the TR element corresponds to the TD,TD represents the column, the general content fills in the column, the rowspan is to represent the cross-row merge, the following numbers represent the merging of cells across several rows, the same colspan is a cross-column merge, the following numbers represent the span of several columns ;
From the above code, we can see that text-align= "center" This property, which is set in the center of the line, but I have written in the TR some write in TD, although this is very bad, but the beginner is normal, but also easier to understand the effect of this property, Because I have some to be in the middle of the line, so write in the TR, and some only need a column center, the column is a separate center.

The last is a tag, a tag is a hyperlink, the href attribute is it to link to that page ( Note that the href must addhttp://, that is, the link is the HTTP protocol);

In fact the code is very simple, beginners can see. These are basically table things, really write the page, now with table is obviously very unrealistic, but this is also the basis. Fragmented said some, hope for beginners useful.

HTML Beginner (These two days with a girl to write div+css, always feel that she understands the way is not very right)

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.