Sort out some basic concepts in HTML

Source: Internet
Author: User

(Concept from http://www.w3school.com.cn /)

What is HTML?

HTML is a language used to describe web pages.

  • HTML refers to the hypertext markup language (HYperTEXTMArkupLAnguage)
  • HTML is not a programming language, butMarkup Language(Markup Language)
  • The markup language is a setTag(Markup tag)
  • HTML usageTagTo describe Web pages

 

HTML Tag

 

HTML Tag is usually called HTML Tag ).

 

  • The HTML Tag is composedAngle bracketsSurrounding keywords, such as <HTML>
  • HTML tags are usuallyAppear in pairsFor example, <B> and </B>
  • The first tag in the tag pair isStart tagThe second tag isEnd tag
  • The start and end labels are also calledOpen tagsAndClose tags

 

HTML document = webpage

 

  • HTML documentDescription webpage
  • HTML documentContains HTML tagsPlain text
  • HTML documents are also calledWebpage

 

What is an HTML Tag?
  • HTML documents and HTML elements are marked by HTML tags.
  • HTML tags consist of start tags and end tags
  • The start tag is the name of the element surrounded by parentheses.
  • The end tag is the slash and element name surrounded by parentheses.
  • Some HTML elements do not have end tags, such as <br/>
HTML title

HTML heading is defined by HTML section

The HTML section is defined by the <p> label.

HTML link

Html links are defined using the <A> label.

HTML Image

HTML images are defined using the label.

 

HTML documents are defined by HTML elements.

HTML Element

An HTML element refers to all the code from the start tag to the end tag.

Start tag Element Content End tag
<P> This is a paragraph </P>
<A href = "default.htm"> This is a link </A>
<Br/>    

Note: The start tag is often called an opening tag, and the end tag is often called a closed tag ).

 

HTML element syntax

 

  • The HTML element usesStart tagStart
  • The HTML element usesEnd tagTermination
  • Element ContentIs the content between the start tag and the end tag.
  • Some HTML elements haveEmpty content)
  • Empty ElementClose in start tag(End with the end of the start tag)
  • Most HTML elements can haveAttribute

 

Nested HTML elements

 

Most HTML elements can be nested (Other HTML elements can be included ).

 

An HTML document consists of Nested HTML elements.

 

Empty HTML Element

HTML content without content is called an empty element. Empty elements are disabled in the start tag.

<Br/> is an empty element that does not close the tag (<br/> label definition line feed ).

In XHTML, XML, and HTML of future versions, all elements must be disabled.

Adding a slash to the start tag, such as <br/>, is the correct method to disable empty elements. html, XHTML, and XML both accept this method.

Even if <br> is valid in all browsers, using <br/> is actually a long-term guarantee.

 

Attributes provide additional information for HTML elements.

 

HTML attributes

 

HTML tags can haveAttribute. Attribute provides HTML elementsMore information.

 

Attributes always appear in the form of name/value pairs, such:Name = "value".

 

Attribute is always in the HTML ElementStart tag.

 

Core Attributes)

The following tags do not provide the following attributes: Base, Head, HTML, Meta, Param, script, style, and title.

Attribute Value Description
Class Classname Specifies the Class Name of the element (classname)
ID ID Unique ID of the specified Element
Style Style_definition Specifies the line style of an element)
Title Text Additional information about the specified Element (displayed in the tooltip)
 

HTML standard property link: http://www.w3school.com.cn/tags/html_ref_standardattributes.asp

 

 

 

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.