In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "Html common tags and problems". In daily operation, I believe many people have doubts about Html common tags and problems. Xiaobian consulted all kinds of information and sorted out simple and easy to use operation methods. I hope to help you answer the doubts of "Html common tags and problems"! Next, please follow the small series to learn together!
HTML tags
Function:
Used to tell the browser that this is a web page, that is, tell the browser that I am an HTML document
Attention:
All other tags must be written inside html tags, that is, between html start and end tags
head tag
Function:
Specify the title of the website/Specify the small image of the website
Add SEO-related information of the website (specify keywords of the website/specify description information of the website)
Plug-in some external css/js files
Add some browser adaptation related content
Used to add some configuration information to the website
For example:
Attention:
In general, the content written inside the head tag will not be displayed to the user, which means that we will not see the content written inside the head tag under normal circumstances.
title tag
Function:
This is used exclusively to specify the title of the website, and this specified title will also serve as the default title for user-saved websites in the future
Attention:
The title tag must be inside the head tag.
body tag
Function:
Specifically used to define what content (text/images/audio/video) needs to be displayed to the user in HTML documents
Attention:
Although sometimes you may write the content elsewhere and you can see it on the web page, don't do this. Be sure to write the content you want to display in the body.
A pair of html tags (an html start tag and an html end tag) can have only one pair of body tags
head internal label
meta tag
1. Why is there a garbled phenomenon?
Because we didn't specify a character set when we wrote the page
2. How to solve the garbled phenomenon?
Add to the head tag, specify character set
3. What is a character set?
A character set is a collection of characters, which is a bunch of characters stacked together. In fact, the character set is very similar to our ancient "movable type printing". In movable type printing, a lot of small chapters engraved with Chinese characters are put into a box, and then when you need to print words, you can take this small chapter out of the box. It is precisely because of this that it leads to the problem of garbled characters.
Suppose that both northerners and southerners have boxes full of small seals, but southerners and northerners store small seals in different order in the box, then if both northerners and southerners need to get the word "Li" at this time, in the memory of southerners Li is in the sixth column of the sixth row of the box (666), and in the memory of northerners Li is in the eighth column of the eighth row of the box (888). So at this time, if a southerner goes to the northerner's box and takes the small seal of the word "Li," he will definitely not find it, so it will lead to the garbled code problem.
The northerner's box for storing the small chapter and the southerner's box for storing the small chapter correspond to the specified character set in the web page. In the web page, we have two common character sets GBK/UTF-8. GBK corresponds to the box stored by the northerner, and UTF-8 corresponds to the box stored by the southerner.
So the point of specifying character sets in web pages is to tell the browser which box I'm using and how you should look to find the right content.
4. GBK (GB2312) and UTF-8 differences
Submit larger
It's smaller.
GBK(GB2312) stores fewer characters, only Chinese characters and some commonly used foreign languages
UTF-8 stores all the words in the world
5. So should we use GBK(GB2312) or UTF-8 in enterprise development?
If your website contains only Chinese, GB2312 is recommended because it is smaller and faster to access
If your website contains languages other than Chinese, UTF-8 is recommended
Lazy recommended: regardless of 37 21, all write UTF-8 can be
At this point, the study of "Html common tags and problems" is over, hoping to solve everyone's doubts. Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.