首頁  >  文章  >  web前端  >  html中為網頁設定字元集的標籤是什麼?

html中為網頁設定字元集的標籤是什麼?

烟雨青岚
烟雨青岚原創
2020-07-01 10:13:055347瀏覽

html中為網頁設定字元集的標籤是meta標籤。 META標籤用來描述一個HTML網頁文件的屬性,除了提供文件字元集、使用語言、作者等基本資訊外,還涉及關鍵字和網頁等級的設定。

html中為網頁設定字元集的標籤是什麼?

可以透過head標籤中的meta標籤進行設定

例如設定頁面的字元集為utf-8,則對應的meta標籤為:

通常所說的META標籤,是在HTML網頁原始碼中一個重要的html標籤。 META標籤用來描述一個HTML網頁文件的屬性,例如作者、日期和時間、網頁描述、關鍵字、頁面重新整理等。

META標籤是HTML標記HEAD區的關鍵標籤,它位於HTML文件的和之間(有些也不是在<head>和<title>之間)。它提供的資訊雖然使用者不可見,但卻是文件的最基本的元資訊。 <meta>除了提供文件字元集、使用語言、作者等基本資訊外,還涉及關鍵字和網頁等級的設定。 </p> <p>所以有關搜尋引擎註冊、搜尋引擎優化排名等網路行銷方法內容中,通常都要談論META標籤的作用,我們甚至可以說,META標籤的內容設計對於搜尋引擎行銷來說是至關重要的一個因素,合理利用 Meta 標籤的 Description 和Keywords 屬性,加入網站的說明或網頁的關鍵字,可讓網站更貼近使用者體驗。 </p> <p>從HTML程式碼實例可以看到,一段程式碼中有3個含有meta的地方,且meta並不是獨立存在的,而是要在後面連接其他的屬性,如description、Keywords、http -equiv等。以下簡單介紹一些搜尋引擎行銷中常見的META標籤的組成及其作用。 </p> <p>推薦教學:《<a href="https://www.php.cn/div-tutorial.html" target="_blank">HTML教學</a>》</p>###<p>以上是html中為網頁設定字元集的標籤是什麼?的詳細內容。更多資訊請關注PHP中文網其他相關文章!</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>陳述:</span><div>本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn</div></div></div><div class="nphpSytBox"><span>上一篇:<a class="dBlack" title="一起來聊聊html與HTML5的差別" href="http://m.php.cn/zh-tw/faq/453370.html">一起來聊聊html與HTML5的差別</a></span><span>下一篇:<a class="dBlack" title="一起來聊聊html與HTML5的差別" href="http://m.php.cn/zh-tw/faq/453638.html">一起來聊聊html與HTML5的差別</a></span></div><div class="nphpSytBox2"><div class="nphpZbktTitle"><h2>相關文章</h2><em><a href="http://m.php.cn/zh-tw/article.html" class="bBlack"><i>看更多</i><b></b></a></em><div class="clear"></div></div><ul class="nphpXgwzList"><li><b></b><a href="http://m.php.cn/zh-tw/faq/453183.html" title="詳細介紹HTML中的label標籤" class="aBlack">詳細介紹HTML中的label標籤</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/zh-tw/faq/453184.html" title="為什麼要把JavaScript檔放在Html底部" class="aBlack">為什麼要把JavaScript檔放在Html底部</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/zh-tw/faq/453367.html" title="手把手教你在html中引入另一個html檔的方法(詳解)" class="aBlack">手把手教你在html中引入另一個html檔的方法(詳解)</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/zh-tw/faq/453370.html" title="一起來聊聊html與HTML5的差別" class="aBlack">一起來聊聊html與HTML5的差別</a><div class="clear"></div></li></ul></div></div><div class="nphpFoot"><div class="nphpFootBg"><ul class="nphpFootMenu"><li><a href="http://m.php.cn/zh-tw/"><b class="icon1"></b><p>首頁</p></a></li><li><a href="http://m.php.cn/zh-tw/course.html"><b class="icon2"></b><p>課程</p></a></li><li><a href="http://m.php.cn/zh-tw/wenda.html"><b class="icon4"></b><p>問答</p></a></li><li><a href="http://m.php.cn/zh-tw/login"><b class="icon5"></b><p>我的</p></a></li><div class="clear"></div></ul></div></div><div class="nphpYouBox" style="display: none;"><div class="nphpYouBg"><div class="nphpYouTitle"><span onclick="$('.nphpYouBox').hide()"></span><a href="http://m.php.cn/zh-tw/"></a><div class="clear"></div></div><ul class="nphpYouList"><li><a href="http://m.php.cn/zh-tw/"><b class="icon1"></b><span>首頁</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/zh-tw/course.html"><b class="icon2"></b><span>課程</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/zh-tw/article.html"><b class="icon3"></b><span>文章</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/zh-tw/wenda.html"><b class="icon4"></b><span>問答</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/zh-tw/dic.html"><b class="icon6"></b><span>詞典</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/zh-tw/course/type/99.html"><b class="icon7"></b><span>手册</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/zh-tw/xiazai/"><b class="icon8"></b><span>下載</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/zh-tw/faq/zt" title="專題"><b class="icon12"></b><span>專題</span><div class="clear"></div></a></li><div class="clear"></div></ul></div></div><div class="nphpDing" style="display: none;"><div class="nphpDinglogo"><a href="http://m.php.cn/zh-tw/"></a></div><div class="nphpNavIn1"><div class="swiper-container nphpNavSwiper1"><div class="swiper-wrapper"><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/" >首頁</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/article.html" class="hover">文章</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/wenda.html" >問答</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/course.html" >課程</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/faq/zt" >專題</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/xiazai" >下載</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/game" >遊戲</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/dic.html" >詞典</a></div><div class="clear"></div></div></div><div class="langadivs" ><a href="javascript:;" class="bg4 bglanguage"></a><div class="langadiv" ><a onclick="javascript:setlang('zh-cn');" class="language course-right-orders chooselan " href="javascript:;"><span>简体中文</span><span>(ZH-CN)</span></a><a onclick="javascript:setlang('en');" class="language course-right-orders chooselan " href="javascript:;"><span>English</span><span>(EN)</span></a><a onclick="javascript:;" class="language course-right-orders chooselan chooselanguage" href="javascript:;"><span>繁体中文</span><span>(ZH-TW)</span></a><a onclick="javascript:setlang('ja');" class="language course-right-orders chooselan " href="javascript:;"><span>日本語</span><span>(JA)</span></a><a onclick="javascript:setlang('ko');" class="language course-right-orders chooselan " href="javascript:;"><span>한국어</span><span>(KO)</span></a><a onclick="javascript:setlang('ms');" class="language course-right-orders chooselan " href="javascript:;"><span>Melayu</span><span>(MS)</span></a><a onclick="javascript:setlang('fr');" class="language course-right-orders chooselan " href="javascript:;"><span>Français</span><span>(FR)</span></a><a onclick="javascript:setlang('de');" class="language course-right-orders chooselan " href="javascript:;"><span>Deutsch</span><span>(DE)</span></a></div></div><script> var swiper = new Swiper('.nphpNavSwiper1', { slidesPerView : 'auto', observer: true,//修改swiper自己或子元素时,自动初始化swiper observeParents: true,//修改swiper的父元素时,自动初始化swiper }); </script></div></div><!--顶部导航 end--><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>