There are two extensions for html files: "html" and "htm". An html file is a plain text file, a descriptive text composed of HTML commands, and a static web page file; an HTML file can only write plain text when editing, and cannot directly write text like a ".doc" document. Content styling.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
The full English name of HTML is Hyper Text Markup Language, which is translated into Chinese as "Hyper Text Markup Language" and is specially used to design and edit web pages.
Files written in HTML are called "HTML documents", and the general suffix is .html
(.htm
can also be used, but it is rare). An HTML document is a plain text file that you can open or create using text editors such as Windows Notepad, Linux Vim, Notepad, Sublime Text, and VS Code.
HTML document = web page
HTML document describes the web page.
HTML documents are also called web pages.
HTML documents contain HTML tags and plain text.
HTML tags:
HTML is a markup language that uses various tags to format content. The characteristics of the tags are as follows:
HTML tags are composed of keywords surrounded by angle brackets, such as ;
Web browsers do not display the HTML tag , which uses tags to explain the content of the page .
nbsp;html> <meta> <title>第一个网页</title> <h1>这是我的第一个网页</h1> <p>我一定会成为一名优秀的前端开发工程师。</p>
Explanation of tag code in this example:1. The description of the web page must be written in the
tag. 2. Title, character encoding, compatibility, keywords, description and other information must be written in the
tag. 3. The content to be displayed on the web page must be written in the
tag. Although sometimes code written not according to standards can be displayed normally, as a professional quality, formal writing habits must be developed.
The final running result is to display the content of the page without displaying HTML tags.
The Web browser display effect is as follows:
Windows comes with a software called Notepad.The meaning and difference between non-plain text files and plain text files:
- The document format saved by Notepad is .txt format
, which is the abbreviation of English text. In terminology, this file is called: "Plain text file
".
** .doc non-plain text files:* *
##Summary of the meaning and difference between non-plain text files and plain text files:
Meaning:
Difference:
Why do we first explain the meaning and difference between non-plain text files and plain text files?
Because:
HTML is plain text!
HTML files can only write plain text when editing. You will find that it cannot directly style text content like .doc documents. !
We can do a small experiment, which is also the most classic experiment that proves that HTML is a plain text file:
We are on the computer Create a new Notepad .txt file on the desktop. Open it and write any text content, then Ctrl S to save, and then close the file. Next step we forcefully change the .txt extension of the file to the .html extension. At this time, the .html file is a web page file At this time we use the browser to open it, and we find that the browser can display the original version normally All the content! In this way, I started to modify a .txt file into a .html file, until I finally ran it using the browser, I found that the entire content would be displayed normally, which is enough. Prove that HTML is a plain text file!In addition, we can also use Notepad to write HTML files, because HTML files are completely plain text files (but no one does this in actual development, here is just an explanation) . For more programming related knowledge, please visit:Programming Video! !
The above is the detailed content of What is the extension of html files? What is the file type of the file?. For more information, please follow other related articles on the PHP Chinese website!