<元字符集=“utf-8">vs<meta http-equiv=“Content-Type">

lt;meta charset=quot;utf-8quot;gt; vs lt;meta http-equiv=quot;Content-Typequot;gt;(lt;元字符集=“utf-8gt;vslt;meta http-equiv=“Content-Typegt;)

本文介绍了<元字符集=“utf-8">vs<meta http-equiv=“Content-Type">的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

In order to define charset for HTML5 Doctype, which notation should I use?

  1. Short:

    <meta charset="utf-8" /> 
    

  2. Long:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    

解决方案

In HTML5, they are equivalent. Use the shorter one, as it is easier to remember and type. Browser support is fine since it was designed for backwards compatibility.

这篇关于&lt;元字符集=“utf-8"&gt;vs&lt;meta http-equiv=“Content-Type"&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:&lt;元字符集=“utf-8"&gt;vs&lt;meta http-equiv=“Content-Type"&gt;

基础教程推荐