HTML Basic Concepts

Source: Internet
Author: User
Tags closing tag
Briefly introduce the basic concept of HMLT, suitable for beginners.

What is an HTML file?
The English full name of HTML is hypertext Marked Language, Chinese is called "Hypertext Markup Language".
Unlike the general text, an HTML file contains not only textual content, but also some tag, which is called "tag" in Chinese.
The suffix name for an HTML file is. htm or. html.
You can write HTML files with a text editor.
Let's try writing an HTML file!
Open your Notepad, create a new file, and then copy the following code to the new file, and then save the file as a first.html.



title of Page


This is my homepage. this text is bold


To browse this first.html file, double-click it. or open the browser, select Open in the File menu, and then select this file on the line.

Example explanation
The first tag of this file is , and this tag tells your browser that this is the header of the HTML file. The last tag of the file is , which means that the HTML file ends here.

The content between and is the head information. The head information is not displayed, you can't see it in the browser. But that does not mean that the information is useless. For example, you can add some keywords to the head information to help search engines search your Web pages.

The content between and is the title of this file. You can see this title in the top-most title bar of your browser.

The information between and is the text.

The text between and is expressed in bold. , as the name suggests, is the meaning of bold.

The HTML file looks similar to the general text, but it is more than the general text tag, such as ,, through these tags, you can tell the browser how to display the file.

HTML element (HTML Elements)
HTML elements (HTML element) are used to mark text, representing the contents of the text. For example, Body, p, title is HTML element.
HTML elements are represented by tag, and tag begins with <, ending with >.
Tags usually appear in pairs, such as . The beginning is called opening tag, the ending is called closing tag.
The current HTML tag is case-insensitive. For example,, and are actually the same.
Attributes of HTML elements (HTML Elements)
HTML elements can have attributes. Attributes can extend the ability of HTML elements.

For example, you can use a bgcolor property to make the background color of the page red, like this:



For example, you can use the border attribute to make a table in a borderless form. As follows:




Attributes are typically represented by attribute names and values, like this: Name= "value". The bgcolor in the example above, border is name,red and 0 is value. Property values are typically marked with double quotes.

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.