HTML basic tutorial file structure
<!DOCTYPE HTML> <html> <head> <title>php.cn</title> </head> <body> 这里是存放网页内容的 </body> </html>
Explanation of HTML file structure:
- ##<!DOCTYPE HTML>: html5 standard web page declaration, must be placed in HTML The first line of the document, before the <html> tag
- The meaning of the <html></html> tag: tells the browser what format the code in it should be used in (picture , video) to compile. ##<head></head>The meaning of the tag: tells the browser what character set (GB2312, BIG5, JIS) to use to display the Chinese characters in the web page. Without using the correct character set, web pages will appear garbled. GB2312 (Simplified Chinese), BIG5 (Traditional Chinese), JIS (Japanese), utf-8 (multiple languages)
- ## <title></title> can only be pure Text and any markup will be displayed intact.
- <body></body> is the display area for the main content of the web page. 99% of the content on the web page must be placed in <body>. Only when placed in <body> can the result be seen after the final browser translation.
Function: Tell the browser how to translate Chinese characters.
http-equiv: Simulates the original file header information of the http protocol. The main purpose is to display it in the format when the server returns it to the client.- Content-type: Content type.
- Content: Detailed content type introduction.
- Text/html: The web page is in text format, and html is a small format in the text.
- Charset: Character set, mainly controls how Chinese characters are displayed.
- Utf-8: Multi-language encoding, any country’s language can be displayed normally.
new file
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>这是我们的第一个页面</title>
</head>
<body>
<h1>欢迎加入php.cn</h1>
<h2>希望你能够在这里学的开心</h2>
</body>
</html>
Preview
Clear
- Course Recommendations
- Courseware download
The courseware is not available for download at the moment. The staff is currently organizing it. Please pay more attention to this course in the future~
Students who have watched this course are also learning
Let's briefly talk about starting a business in PHP
Quick introduction to web front-end development
Large-scale practical Tianlongbabu development of Mini version MVC framework imitating the encyclopedia website of embarrassing things
Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum]
Login verification and classic message board
Computer network knowledge collection
Quick Start Node.JS Full Version
The front-end course that understands you best: HTML5/CSS3/ES6/NPM/Vue/...[Original]
Write your own PHP MVC framework (40 chapters in depth/big details/must read for newbies to advance)
















