HTML composition and Basic tags

Source: Internet
Author: User
Tags border color deprecated tag name

Hypertext Markup Language: HTML

Web Consortium: Internet Alliance

Comment Syntax:<!--commented-out Content-

Label Format:

Double Label element:< Tag Name property style= Style > Content </tag name >

Single-label element:< tag name/> or < tag name >

Basic Tags:

First class: Bring your Own label

<body> subject tag, inside the page content

<title> Title of Web page

Several properties of <body>:

bgcolor background color

Background background image

Text color

Type II: Format label

<font color= "#663399" face= "Microsoft Jas Black" size= "3" > Operation text </font>

<b> Bold

<strong> Bold

<i> Tilt

<em> Tilt

<u> Underline

<br/> line break

&nbsp; Space

<center> Center

Category III: Content labels

<p> paragraph labels, automatically blank lines between paragraphs

<div> layer label, content container, page layout, default row

<span> layer label, content container, default how much space is occupied

<ul> unordered list, with each item in <li>, the list symbol can be changed

<ol> There are sequence lists, each of which is used <li> The list symbol can be changed

<ol type= "1" >--sequential list with a serial number of ..., you can change the ordinal form in quotation marks

<li> content </li>

<li> content </li>

</ol>--The above "ol" is changed to "UL" is an unordered list

“.. /"indicates the parent directory

"./" indicates the current directory

Relative path: Finds from the current page.

Absolute path: Search from the root of the site. "/", which represents the root of the site.

HTML The element refers to all the code from the start tag (start tag) to the end tag (end tag).

Four, the common label

1. Hyperlink tag

Path problem: How the handwriting path is written is based on the location of the page, if the parent folder is used to find it. /If you find a child folder for it/until you find the picture

<a href= "hyperlink address" target= "_blank" > Hyperlink text </a>--href (hyperlink reference)

Properties value Description
CharSet Char_encoding Not supported in HTML5. Specifies the character set of the linked document.
Coords Coordinates Not supported in HTML5. Specifies the coordinates of the link.
Download FileName Specifies the hyperlink target to be downloaded.
Href Url Specifies the URL of the page to which the link is directed.
Hreflang Language_code Specifies the language of the document being linked.
Media Media_query Specifies which media/device the linked document is optimized for.
Name Section_name Not supported in HTML5. Specifies the name of the anchor.
Rel Text Specifies the relationship between the current document and the linked document.
Rev Text Not supported in HTML5. Specifies the relationship between the linked document and the current document.
Shape
  • Default
  • Rect
  • Circle
  • Poly
Not supported in HTML5. Specifies the shape of the link.
Target
  • _blank
  • _parent
  • _self
  • _top
  • FrameName
Specifies where to open the linked document.
Type MIME type Specifies the MIME type of the linked document.

The first step: do the anchor point label. <a name= "" ></a> 

Step Two: do anchor links. <a href= "#目标链接的name的值" ></a>

Picture hyperlink: <a href= "hyperlink address" target= "_blank" > </a>

2. Picture Label

Required Properties

Properties value Description
Alt Text Specifies alternate text for the image. alt Displays text when a picture cannot be loaded, and also helps search engines.
Src Url Specifies the URL to display the image.

Optional properties

Properties value Description
Align
  • Top
  • Bottom
  • Middle
  • Left
  • Right
It is not recommended. Specifies how images are arranged according to the surrounding text.
Border Pixels It is not recommended. Defines the border around the image.
Height
  • Pixels
  • %
Defines the height of the image. high heel width set One, display picture is scaled proportionally
Hspace Pixels It is not recommended. Defines the white space on the left and right side of the image.
Ismap Url Defines the image as a server-side image map.
Longdesc Url Point to the URL that contains the long image description document.
Usemap Url Defines an image as a client-side image map.
Vspace Pixels It is not recommended. Defines the white space at the top and bottom of the image.
Width
  • Pixels
  • %
Sets the width of the image.

Note:

“.. /"indicates the parent directory

"./" indicates the current directory

Relative path: Finds from the current page.

Absolute path: Search from the root of the site. "/", which represents the root of the site.

HTML The element refers to all the code from the start tag (start tag) to the end tag (end tag).

4. Table Label:

<table> Properties: Width: Table width, border: Border cellspacing: Cell spacing cellpadding: Cell padding bordercolor: Border color

<tr> rows, properties: bgcolor: Background color,

<td> Cells: Properties: Width: Widths, height: height, align: horizontal alignment valign: Vertical alignment rowspan= "3" merge column colspan= "2" merge rows

HTML composition and Basic tags

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.