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.