Many times, when learning web page production and development, the first thing that is impressive is the web pages ending with the suffix of html or htm. We attribute this type of web page to static web pages, except for pseudo-static.
So what is the difference between html or html and other web pages ending with suffixes such as php, asp, aspx, jsp, etc.?First of all, the html page is static. There is no program execution from beginning to end. It is in pure html language and is sent directly to the browser for presentation to the browser without being processed by the server.
The web page at the end of other suffixes is relatively dynamic web pages. The dynamic page is processed by the server to translate and process each program, database operations, etc., and the browser then gives the server's data to the user, and the web page content data can be changed according to the change of the background data.
So what is the basic html language organization like?Let's take a look at the html structure first:
<html> <head> <title>Put the title of the article</title> <meta http-equiv=Content-Type content=text/html; charset=gb2312 /> //This is the web page encoding, now it is gb2312 <meta name=keywords content=keywords/> <meta name=description content=This page description or keyword description/> </head> <body> This is the main content</body> </html>
Complete HTML includes htmlDOCTYPE declaration, title title, head, web encoding declaration, etc.
Initially using the full html source code:
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 0 Transitional//EN http://wwworg/TR/xhtml1/DTD/xhtml1-transitionaldtd> <html xmlns=http://wwworg/1999/xhtml> <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <title>Title part-power node</title> <meta name=keywords content=keywords/keywords/> <meta name=description content=Description of this page or keyword description/ </head> <body> Content</body> </html>
The latest complete HTML structure - HTML source code (recommended):
<!DOCTYPE html> <html lang=zh-CN> <head> <meta charset=utf-8> <title>Web page title</title> <meta name=keywords content=Keywords/> <meta name=description content=This web page description/ </head> <body> Web page body content</body> </html>
Whether it is html or other dynamic pages with suffixes, the html language structure is like this, but ends with different suffixes when naming web page files.
1. Whether it is a dynamic or static page, it starts with <html> and then ends with </html> at the end of the web page.
2. <html> is followed by the <head> page header. The content in <head></head> cannot be displayed in the browser. Here are areas such as server, browser, link external JS, a link CSS style, etc., and the page title is placed in the <title></title>.
3. Then <meta name=keywords content=keywords/> <meta name=description content=Description of this page or keyword description/> The content in these two tags is an explanation for search engines. The keywords of this page and the main content of this web page can be used.
4. Next is the main text <body></body>, which is commonly referred to as the body area. The content placed here can be presented to the user through the browser. The content can be table layout format content, DIV layout content, or directly text. This is also the most important area, the content presentation area of the web page.
5. Finally, it ends with </html>, that is, the web page is closed.
The above is a complete and simplest basic structure of the html language. Through the above, more styles and content can be added to enrich the web page.
Note: Web pages generally require each tag to be closed according to the xhtml standard, such as: start with <html> and close with </html>; if there is no closure, such as <meta name=keywords content= keywords/>, then <meta/> will be completed.
The above is the simplest html language structure in simple terms. If you need to see more and richer html language structures, you can open a website's web page, then click on the browser to view -- and then click on the source code to see the html language structure of the web page. This way, you can analyze the HTML language structure and content of this web page based on this source code.