HTML Basic Concepts

Source: Internet
Author: User
Tags closing tag

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>title of Page</title>
<body>
This is my homepage. <b>this text is bold</b>
</body>
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

The content between

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

The information between <body> and </body> is the text.

The text between <b> and </b> is expressed in bold. <b>, 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

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 <body></body>. The beginning is called opening tag, the ending is called closing tag.
The current HTML tag is case-insensitive. For example,,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:


<body bgcolor= "Red" >
For example, you can use the border attribute to make a table in a borderless form. As follows:

<table border= "0" >

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.

Properties are usually appended to HTML opening tag, not closing tag.

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.