Getting started with HTML and getting started with html

Source: Internet
Author: User

Getting started with HTML and getting started with html
This is an introduction to HTML for cainiao like me: Recently based onLAMPI wrote a very simple personal homepage, embedded a search engine box, a login interface, and a simple URL navigation. Mainly inHereI learned it because it cannot be reproduced, so I changed the content. You are welcome to join cainiao in discussing HTML and related content. I personally thinkW3shoolIt is a good place to learn.

I recently learned some about HTML, and did not have a detailed system to learn its syntax knowledge. I have learned some about it at the basic level.

What is HTML?Below is
<Html>
<Body>
<H1> My Heading <P> My paragraph. </p>
</Body>
</Html>
HTML (Hyper Text Markup Language) is a Language used to describe web pages. Rather than programming languages, this is different from the C language. XML is used to store and transmit webpage information, while HTML is used to display webpage information. Pay attention to the differences between the two. HTML documents are actually called Web pages. Web browsers read HTML documents and display them as webpages. Of course, labels are not displayed.

HTML has many tags-tags. HTML tags are keywords surrounded by Angle brackets. For example,

HTMLLinkIs defined by the <a> label. For example:

<A href = "http://www.w3school.com.cn"> This is a link </a>
HTML ImageIs defined by the label, for example:

The HTML annotation is like this <! -->


 HTML style attributes

The role of style attribute: provides a general method to change the style of all HTML elements. Style is introduced in HTML 4, which is a new preferred way to change the style of HTML elements. HTML styles can be directly added to HTML elements by using the style attribute, or indirectly defined in an independent style table (CSS file. Css I haven't learned yet...

Table
The table is defined by the <table> label. Each table has several rows (defined by the <tr> label) and each row is divided into several cells (defined by the <td> label ). The letter td refers to table data, that is, data cells.
. Data cells can contain text, images, lists, paragraphs, forms, horizontal lines, tables, and so on.
<Table border = "1">
<Tr>
<Td> fruit watermelon </td>
<Td> fruit and Apple </td>
</Tr>
<Tr>
<Td> vegetables and broccoli </td>
<Td> vegetables </td>

</Tr>

It is like this:

Fruit Watermelon Fruit Apple
Vegetables and broccoli Vegetables

</Table>
In fact, the table header is the same as the above, but only a column name is added to the table above. For example, the column name in the first column is what I like, and the second column is what I like.
The table header is defined using the <th> label.
<Table border = "1">
<Tr>
<Th> Heading </th>
<Th> Another Heading </th>
</Tr>
<Tr>
<Td> XXX </td>
<Td> XXX </td>
</Tr>
<Tr>
<Td> XXX </td>
<Td> XXX </td>
</Tr>
</Table>

A form is an area that contains form elements. A form element is an element that allows users to enter information in a form (such as text fields, drop-down lists, single quotes, and check boxes.
The form is defined using the form label (<form>.
Text Field)
Text fields are used when you need to type letters, numbers, and other content in a form. It's just like our Renren's email box and password.
<Form>
First name:
<Input type = "text" name = "firstname"/>
<Br/>
Last name:
<Input type = "text" name = "lastname"/>
</Form>
Radio button (Radio Buttons)
When a user selects a single shard from a number of given options, a single shard is used. Just like selecting a gender during registration.
<Form>
<Input type = "radio" name = "sex" value = "male"/> Male
<Br/>
<Input type = "radio" name = "sex" value = "female"/> Female
</Form>

Check box (Checkboxes)
The check box is used when you need to select one or more options from several given options. Just like checking your hobbies. The Action attribute and confirmation button of the form. When you click the OK button, the content of the form is transmitted to another file. The action attribute of the form defines the object name of the target file. The file defined by the Action property usually processes the received input data.


With the submit button, just like a search engine. Or Click Browse when the log is a persistent image.

<Form name = "input" action = "html_form_action.asp" method = "get">
Username:
<Input type = "text" name = "user"/>
<Input type = "submit" value = "Submit"/>

</F>

So many changes and adjustments have been made since we copied the contents of w3chool.

HTML4.01 reference manual. For more information, seeHere

Tag Description DTD
<! --... --> Define comments. STF
<! DOCTYPE> Define the document type. STF
<A> Define the anchor. STF
<Abbr> Define the abbreviation. STF
<Acronym> Define the abbreviation of the first letter. STF
<Address> Defines the contact information of the Document Author or owner. STF
<Applet> We do not agree to use it. Defines the embedded applet. TF
<Area> Defines the region of the image ing. STF
<B> Define the bold characters. STF
<Base> Define the default addresses or default targets of all links on the page. STF
<Basefont> We do not agree to use it. Defines the default font, color, or size of text on the page. TF
<Bdo> Define the text direction. STF
<Big> Define large text. STF
<Blockquote> Define a long reference. STF
<Body> Define the document subject. STF
<Br> Define simple lines. STF
<Button> Define a button ). STF
<Caption> Define the table title. STF
<Center> We do not agree to use it. Defines the center text. TF
<Cite> Define reference ). STF
<Code> Define the computer code text. STF
<Col> Defines the attribute values of one or more columns in a table. STF
<Colgroup> Defines the column groups for formatting in the table. STF
<Dd> Define the description of an item in the definition list. STF
<Del> Defines the deleted text. STF
<Dir> We do not agree to use it. Define the directory list. TF
<Div> Define the section in the document. STF
<Dfn> Define a project. STF
<Dl> Definition list. STF
<Dt> Define a project in the definition list. STF
<Em> Define the emphasized text. STF
<Fieldset> Defines the border around the elements in the form. STF
<Font> We do not agree to use it. Defines the font, size, and color of the text. TF
<Form> Define the HTML form for user input. STF
<Frame> Defines a frame set window or frame. F
<Frameset> Define a framework set. F
<H1> to Define the HTML title. STF
<Head> Define document information. STF
<Hr> Define a horizontal line. STF
<Html> Define HTML documents. STF
<I> Defines italics. STF
<Iframe> Define the inline framework. TF
Define the image. STF
<Input> Define the input control. STF
<Ins> Defines the inserted text. STF
<Isindex> We do not agree to use it. Define searchable indexes related to documents. TF
<Kbd> Define the keyboard text. STF
<Label> Defines the annotation of input elements. STF
<Legend> Defines the title of the fieldset element. STF
<Li> Define the items in the list. STF
<Link> Define the relationship between documents and external resources. STF
<Map> Define image ing. STF
<Menu> We do not agree to use it. Define the menu list. TF
<Meta> Define meta information about HTML documents. STF
<Noframes> Define alternative content for users who do not support the framework. TF
<Noscript> Define alternative content for users who do not support client scripts. STF
<Object> Define embedded objects. STF
<Ol> Define an ordered list. STF
<Optgroup> Define a combination of related options in the selection list. STF
<Option> Define the options in the selection list. STF
<P> Define a paragraph. STF
<Param> Define object parameters. STF
<Pre> Defines pre-formatted text. STF
<Q> Define short references. STF
<S> We do not agree to use it. Defines the text with strikethrough. TF
<Samp> Define computer code samples. STF
<Script> Define client scripts. STF
<Select> Definition selection list (drop-down list ). STF
<Small> Defines the small text. STF
<Span> Define the section in the document. STF
<Strike> We do not agree to use it. Defines the added/deleted line text. TF
<Strong> Define the emphasized text. STF
<Style> Defines Document Style information. STF
<Sub> Define subscript text. STF
<Sup> Defines the upper-level text. STF
<Table> Define a table. STF
<Tbody> Define the body content in the table. STF
<Td> Define the units in the table. STF
<Textarea> Defines text input controls for multiple rows. STF
<Tfoot> Define the table note content (footer) in the table ). STF
<Th> Defines the header cell in the table. STF
<Thead> Define the table header content. STF
<Title> Define the document title. STF
<Tr> Define rows in the table. STF
<Tt> Define typewriter text. STF
<U> We do not agree to use it. Defines the underline text. TF
<Ul> Define an unordered list. STF
<Var> Defines the variable part of the text. STF
<Xmp> We do not agree to use it. Defines pre-formatted text.  

By Function

Tag Description DTD
<! DOCTYPE> Define the document type. STF
<Html> Define HTML documents. STF
<Body> Define the document subject. STF
<H1> to Define the HTML title. STF
<P> Define a paragraph. STF
<Br> Define simple lines. STF
<Hr> Define a horizontal line. STF
<! --... --> Define comments. STF
Tag Description DTD
<B> Defines the bold text. STF
<Font> We do not agree to use it. Define text fonts, sizes, and colors TF
<I> Defines italic text. STF
<Em> Define the emphasized text. STF
<Big> Define large text. STF
<Strong> The definition of the text is more intense. STF
<Small> Defines the small text. STF
<Sup> Defines the upper-level text. STF
<Sub> Define subscript text. STF
<Bdo> Defines the direction of the text. STF
<U> We do not agree to use it. Defines the underline text. TF
Tag Description DTD
<Pre> Define pre-formatted text STF
<Code> Define the computer code text. STF
<Tt> Define typewriter text. STF
<Kbd> Define the keyboard text. STF
<Var> Defines the variable part of the text. STF
<Dfn> Define a project. STF
<Samp> Define computer code samples. STF
<Xmp> We do not agree to use it. Defines pre-formatted text.  
Tag Description DTD
<Acronym> Define the abbreviation of the first letter. STF
<Abbr> Define the abbreviation. STF
<Address> Defines the contact information of the Document Author or owner. STF
<Blockquote> Define block references. STF
<Center> We do not agree to use it. Defines the center text. TF
<Q> Define short references. STF
<Cite> Define reference ). STF
<Ins> Defines the inserted text. STF
<Del> Defines the deleted text. STF
<S> We do not agree to use it. Defines the text with strikethrough. TF
<Strike> We do not agree to use it. Defines the text with strikethrough. TF
Tag Description DTD
<A> Define the anchor. STF
<Link> Define the relationship between documents and external resources. STF
Tag Description DTD
<Frame> Defines a frame set window or frame. F
<Frameset> Define a framework set. F
<Noframes> Define alternative content for users who do not support the framework. TF
<Iframe> Define the inline framework. TF
Tag Description DTD
<Form> Define the HTML form for user input. STF
<Input> Define the input control. STF
<Textarea> Defines text input controls for multiple rows. STF
<Button> Define button. STF
<Select> Definition selection list (drop-down list ). STF
<Optgroup> Define a combination of related options in the selection list. STF
<Option> Define the options in the selection list. STF
<Label> Defines the annotation of input elements. STF
<Fieldset> Defines the border around the elements in the form. STF
<Legend> Defines the title of the fieldset element. STF
<Isindex> We do not agree to use it. Define searchable indexes related to documents. TF
Tag Description DTD
<Ul> Define an unordered list. STF
<Ol> Define an ordered list. STF
<Li> Define the items in the list. STF
<Dir> We do not agree to use it. Define the directory list. TF
<Dl> Definition list. STF
<Dt> Define a project in the definition list. STF
<Dd> Define the description of an item in the definition list. STF
<Menu> We do not agree to use it. Define the menu list. TF
Tag Description DTD
Define the image. STF
<Map> Define image ing. STF
<Area> Defines the area inside the image map. STF
Tag Description DTD
<Table> Definition table STF
<Caption> Define the table title. STF
<Th> Defines the header cell in the table. STF
<Tr> Define rows in the table. STF
<Td> Define the units in the table. STF
<Thead> Define the table header content. STF
<Tbody> Define the body content in the table. STF
<Tfoot> Define the table note content (footer) in the table ). STF
<Col> Defines the attribute values of one or more columns in a table. STF
<Colgroup> Defines the column groups for formatting in the table. STF
Tag Description DTD
<Style> Defines Document Style information. STF
<Div> Define the section in the document. STF
<Span> Define the section in the document. STF
Tag Description DTD
<Head> Define document information. STF
<Title> Define the document title. STF
<Meta> Define meta information about HTML documents. STF
<Base> Define the default addresses or default targets of all links on the page. STF
<Basefont> We do not agree to use it. Defines the default font, color, or size of text on the page. TF
Tag Description DTD
<Script> Define client scripts. STF
<Noscript> Define alternative content for users who do not support client scripts. STF
<Applet> We do not agree to use it. Defines the embedded applet. TF
<Object> Defines the embedded object. STF
<Param> Define object parameters. STF

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.