Home  >  Article  >  Web Front-end  >  What is the tag in html that sets the character set for a web page?

What is the tag in html that sets the character set for a web page?

烟雨青岚
烟雨青岚Original
2020-07-01 10:13:055429browse

The tag in html that sets the character set for the web page is the meta tag. The META tag is used to describe the attributes of an HTML web page document. In addition to providing basic information such as the document character set, language, and author, it also involves setting keywords and web page levels.

What is the tag in html that sets the character set for a web page?

Can be set through the meta tag in the head tag

For example, set the page If the character set is utf-8, the corresponding meta tag is:

.

The so-called META tag is an important html tag in the source code of HTML web pages. The META tag is used to describe the attributes of an HTML web page document, such as author, date and time, web page description, keywords, page refresh, etc.

The META tag is a key tag in the HEAD area of ​​HTML tags. It is located between and of the HTML document (some are not between <head> and <title> ). The information it provides, although not visible to the user, is the most basic meta-information of the document. <meta> In addition to providing basic information such as document character set, language, author, etc., it also involves setting keywords and web page levels. </p> <p>So in content related to search engine registration, search engine optimization rankings and other Internet marketing methods, the role of META tags is usually discussed. We can even say that the content design of META tags is essential for search engine marketing. An important factor is that rational use of the Description and Keywords attributes of the Meta tag, adding the description of the website or the keywords of the web page, can make the website closer to the user experience. </p> <p>As you can see from the HTML code example, there are three places containing meta in a piece of code, and meta does not exist independently, but must be connected to other attributes later, such as description, Keywords, http -equiv etc. The following is a brief introduction to the composition and functions of some common META tags in search engine marketing. </p> <p>Recommended tutorial: "<a href="https://www.php.cn/div-tutorial.html" target="_blank">HTML Tutorial</a>"</p><p>The above is the detailed content of What is the tag in html that sets the character set for a web page?. For more information, please follow other related articles on the PHP Chinese website!</p></div><div class="nphpQianMsg"><a href="javascript:void(0);">html</a> <a href="javascript:void(0);">http</a> <a href="javascript:void(0);">搜索引擎</a><div class="clear"></div></div><div class="nphpQianSheng"><span>Statement:</span><div>The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn</div></div></div><div class="nphpSytBox"><span>Previous article:<a class="dBlack" title="Let’s talk about the difference between html and HTML5" href="https://m.php.cn/faq/453370.html">Let’s talk about the difference between html and HTML5</a></span><span>Next article:<a class="dBlack" title="Let’s talk about the difference between html and HTML5" href="https://m.php.cn/faq/453638.html">Let’s talk about the difference between html and HTML5</a></span></div><div class="nphpSytBox2"><div class="nphpZbktTitle"><h2>Related articles</h2><em><a href="https://m.php.cn/article.html" class="bBlack"><i>See more</i><b></b></a></em><div class="clear"></div></div><ul class="nphpXgwzList"><li><b></b><a href="https://m.php.cn/faq/453183.html" title="Detailed introduction to the label tag in HTML" class="aBlack">Detailed introduction to the label tag in HTML</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/453184.html" title="Why put JavaScript files at the bottom of Html" class="aBlack">Why put JavaScript files at the bottom of Html</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/453367.html" title="Teach you step by step how to introduce another html file into html (detailed explanation)" class="aBlack">Teach you step by step how to introduce another html file into html (detailed explanation)</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/453370.html" title="Let's talk about the difference between html and HTML5" class="aBlack">Let's talk about the difference between html and HTML5</a><div class="clear"></div></li></ul></div></div><footer><div class="footer"><div class="footertop"><img src="/static/imghwm/logo.png" alt=""><p>Public welfare online PHP training,Help PHP learners grow quickly!</p></div><div class="footermid"><a href="https://m.php.cn/about/us.html">About us</a><a href="https://m.php.cn/about/disclaimer.html">Disclaimer</a><a href="https://m.php.cn/update/article_0_1.html">Sitemap</a></div><div class="footerbottom"><p> © php.cn All rights reserved </p></div></div></footer><script>isLogin = 0;</script><script type="text/javascript" src="/static/layui/layui.js"></script><script type="text/javascript" src="/static/js/global.js?4.9.47"></script></div><script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script><link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css' type='text/css' media='all'/><script type='text/javascript' src='/static/js/viewer.min.js?1'></script><script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script><script>jQuery.fn.wait = function (func, times, interval) { var _times = times || -1, //100次 _interval = interval || 20, //20毫秒每次 _self = this, _selector = this.selector, //选择器 _iIntervalID; //定时器id if( this.length ){ //如果已经获取到了,就直接执行函数 func && func.call(this); } else { _iIntervalID = setInterval(function() { if(!_times) { //是0就退出 clearInterval(_iIntervalID); } _times <= 0 || _times--; //如果是正数就 -- _self = $(_selector); //再次选择 if( _self.length ) { //判断是否取到 func && func.call(_self); clearInterval(_iIntervalID); } }, _interval); } return this; } $("table.syntaxhighlighter").wait(function() { $('table.syntaxhighlighter').append("<p class='cnblogs_code_footer'><span class='cnblogs_code_footer_icon'></span></p>"); }); $(document).on("click", ".cnblogs_code_footer",function(){ $(this).parents('table.syntaxhighlighter').css('display','inline-table');$(this).hide(); }); $('.nphpQianCont').viewer({navbar:true,title:false,toolbar:false,movable:false,viewed:function(){$('img').click(function(){$('.viewer-close').trigger('click');});}}); </script></body></html>