We all know that when developing a web page, we must first lay out the structure and components of the web page, so what parts do we need to pay attention to? Let me summarize it for you below.
First of all, the HTML page is static from beginning to end, with no program execution. It is pure HTML language. It is sent directly to the browser and presented to the viewer without being processed by the server.
Relatively speaking, web pages ending with other suffixes are dynamic web pages. Dynamic pages are processed by the server through their own program translation, database operations, etc., and then the browser sends the data processed by the server to the program. Users, and web page content data can change when background data changes.
What is the basic language structure of html?
Let’s take a look at the html structure first:
<html> <head> <title>放置文章标题</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> //这里是网页编码现在是gb2312 <meta name="keywords" content="关键字" /> <meta name="description" content="本页描述或关键字描述" /> </head> <body> 这里就是正文内容 </body> </html>
The complete HTML includes the html DOCTYPE statement, title title, head, web page encoding statement, etc.
Initially use the complete html source code :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>标题部分</title> <meta name="keywords" content="关键字" /> <meta name="description" content="本页描述或关键字描述" /> </head> <body> 内容 </body> </html>
The latest complete HTML structure-HTML source code (recommended):
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>网页标题</title> <meta name="keywords" content="关键字" /> <meta name="description" content="此网页描述" /> </head> <body> 网页正文内容 </body> </html>
Whether it is html or a dynamic page with other suffixes, its html language structure is That's right, it just ends with a different suffix when naming the web page files.
1. Whether it is a dynamic or static page, it starts with "" and ends with "" at the end of the web page.
2. "" is followed by the "
" page header. The content in cannot be displayed in the browser. This is the area for servers, browsers, external JS links, a link CSS styles, etc., and the page title is placed in "3. Then "< ;meta name="keywords" content="Keywords" /> "The content in these two tags is for search engines It shows that the keywords of this page and the main content of this page can be used for SEO.
4. Next is the text "
" which is often referred to as the body area. The content placed here can be presented to the user through the browser, and its content can be a table layout. The format content can also be the content of DIV layout, or it can be text directly. This is also the most important area, the content presentation area of the web page.5. Finally, it ends with "", which means the web page is closed.
The above is a complete and simplest basic structure of 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: starting with and closing with ; if it is not closed, such as If there is no, there will be to complete the closure.
The above is the simplest html language structure in layman's terms. If you need to see more and richer html language structures, you can open a website page, then click "View" on the browser--then click "View source code" can see the HTML language structure of the webpage, so that the HTML language structure and content of the webpage can be analyzed based on the source code.
There are so many components of an HTML web page. For more exciting content, please pay attention to other related articles on the php Chinese website!
Related recommendations:
##How to write the html document type declaration
How to make the web page black and white
The above is the detailed content of What parts does the html web page structure consist of?. For more information, please follow other related articles on the PHP Chinese website!