Simple introduction to HTML basic tags and attributes

Source: Internet
Author: User

  HTML is made up of flags and attributes that are used together to tell the browser how to display a page of documents. Flags are used to refer to a piece of text or a picture, such as a document part, attributes are the option of a flag, decorated in a flag, such as color, alignment, height and width, and so on. Many of the logos appear in pairs, such as <TITLE> have </TITLE> the beginning of the previous expression, the end of the last one, and the content in between. The

Basic structure Flag

<HTML>----------indicates that the file is an HTML file

<HEAD>----------contains the title of the file, the script used, the style definition, and so on

<title>helloworld! </title>-contains the title of the file, and the caption appears in the browser title bar

<HEAD>----------</HEAD> End flag

<BODY>------- -Places all flags and attributes that display information in the browser, where content is displayed in the browser </body>

</HTML>----------<HTML> End Flag

Other major flags all of the following flags are used in <BODY></BODY>

<ahref= "..." ></A>----------link Flags, "..." for the linked file address

----------display Picture logo, "..." for the address of the picture

<BR>----------line wrap flag

<P>----------Segment Flag

<B></B>----------Bold text

<I></I>----------Italic

<HR>-------- -Horizontal line

<TABLE></TABLE>----------definition table, important flags in HTML

<TR></TR>---------- Define the rows for the table, used in the <table≫</table>

<TD></TD>----------table cell, used in <TR></TR>

<FONT>< /FONT>----------Font Style flags The use of the

property: The

property is used to decorate the flag, and the property is placed inside the start tag.

For example: The property bgcolor= "Black" indicates that the background color is dark. Example of a reference attribute: <bodybgcolor= "Black" ></BODY> indicates that the background color of the page is dark, the <tablebgcolor= is "Black-and" ></TABLE> Indicates that the table background color is black.

Common Properties: Align Property Range properties

Align=left Left (default) width= pixel value or Percent object width

Align=center Center height= pixel value or Percent object height

Align=right Right-aligned color properties

color= #RRGGBB前景色参考色彩对照表

bgcolor= #RRGGBB背景色

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.