HTML Basics (No. 0 article): Getting Started with HTML

Source: Internet
Author: User
Tags opening and closing tags

What you need to learn HTML preparation (1)

Know Html:what (what is it)?

①html (Hyper Text Markup Language, a Hypertext Markup Language, is essentially text and requires a browser to interpret it as a specific page content. ).

===> "hypertext" means that the page can contain pictures, links, even music, programs and other non-text elements.

②html is not a programming language !

③html is a language used to describe Web pages !

※ Language is the most important communication tool for human beings, and it is the main expression of communication. People use language to preserve and transmit the fruits of human civilization. Language is a complex symbolic system composed of words according to certain grammar .

==>HTML can be seen as a language , and everyone calls it a markup language, which uses a set of tag tags (Markup tag) to " Talk "(description page). Tell the browser what to do (what to show) by tags (tag tags).

HTML Tags:

  HTML tag tags are often referred to as HTML tags (HTML tag).

  • HTML tags are keywords surrounded by angle brackets , such as .
  • HTML tags are usually paired , such as and .
  • the first label in the pair is the start tag , the second is the end tag .
  • The start and end tags are also known as open tags and closed labels.
  • HTML tags are not case sensitive <HTML> equivalent to , W3school uses lowercase tags because the World Wide Web Consortium is in HTML 4 Lowercase is recommended , and lowercase is mandatory in the future (X) HTML version.

In some books, HTML elements and HTML tags are mentioned.

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

  HTML elements and HTML tags usually refer to the same meaning. But strictly speaking , an HTML element contains a start tag and an end tag, and the opening and closing tags can also be mixed with text or tags, such as:

< P ></ P > < P > This is also an HTML element, except that there is text </p><p> <p> a P tag inside a P tag, the innermost p tag also has the text content </p></  p>

HTML element Syntax:
  • HTML element to start tag starting
  • HTML element terminated with end tag
  • The content of an element is the content between the start tag and the end tag
  • Some HTML elements have empty content ( html without content)   content is called an empty element, such as:
     <  Span style= "COLOR: #800000" >hr  />  <  br  />  <  img  />  <  input  /> 
    There's a place to know.
    Empty elements, but in XHTML, XML, and future versions of HTML, all elements must be closed.
    Adding a slash to the start tag, such as Even if

  • Empty elements are closed in the start tag (ending with the end of the start tag)
  • Most HTML elements can have properties

HTML Document = = Page
    • HTML Document Description Web page
    • HTML documents contain HTML tags and plain text
    • HTML documents are also called Web pages

Here are two HTML documents

What is the difference between an HTML document with. htm and. html for file extensions?
Simple can be understood as follows:
1. The. htm and. html do not differ in nature, representing the same file, but only for different environments.
2, DOS can only recognize 8+3 file name, so *.htm naming method can be DOS recognition, and *.html file naming mode cannot be recognized.
3. In UNIX systems, the Web page must use the. html extension, if it is an HTM, the source code appears when opened in the browser, and two extensions are supported in Windows. It can also be said that the HTM and HTML are the products of Windows and Unix confrontation.
4, if there are index.html and index.htm in the Web page, then the browser will explain index.html first.

So, with HTM or html?

It is recommended to use long suffix html.

Naming should follow the principles of clarity, simplicity and consistency. Meaning clearly refers to the name, such as the HTM (Hypertext Markup) and HTML (Hypertext Markup Language) are used in the English word acronym, meaning clear. Brevity requires that variable names be as short as possible, for example, where the suffix name uses acronyms instead of the whole word. The principle of consistency requires that a large number of variables under the same environment are named in accordance with the same rules, such as some friends accustomed to the Linux folder naming rules, the use of the win system when the new folder naming still refused to use spaces, which caused the new folder name and the old folder name naming rules are inconsistent.

The principle of consistency is often more important. For example, when cooperative development, can not be kept in their own, artificial to improve the difficulty of development.

The HTM is a 8.3-character restricted naming method left over from history, and now we don't follow the 8.3 rule when we name it. Therefore, when you select from the HTM and HTML, you should also select HTML with an unlimited length naming method.

HTML Basics (No. 0 article): Getting Started with HTML

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.