为什么特殊字符在浏览器中显示而不是连字符

时间:2017-09-08 21:33:18

标签: html html5 encoding

enter image description here

我的HTML代码部分   请检查

<div class="col-sm-4">

  <h5><label>Yard Maintenance  </label></h5>

  <input id="67" class="css-checkbox" name="yard[]" type="checkbox" value="Initial Grass Cut – Less than 5,000 Square Feet" />
  <label for="67" name="67" class="css-label"> 
    Initial Grass Cut – Less than 5,000 Square Feet </label><br/>
  <input id="68" class="css-checkbox" name="yard[]" type="checkbox" value="Initial Grass Cut – 5,000-9,999 Square Feet" />
  <label for="68" name="68" class="css-label">Initial Grass Cut – 5,000-9,999 Square Feet</label><br/>
  <input id="69" class="css-checkbox" name="yard[]" type="checkbox" value="Initial Grass Cut – 10,000-14,999 Square Feet" />
  <label for="69" name="69" class="css-label">Initial Grass Cut – 10,000-14,999 Square Feet  </label><br/>

  <input id="70" name="yard[]" class="css-checkbox" type="checkbox" value="Initial Grass Cut – 10,000-14,999 Square Feet" />
  <label for="70" name="70" class="css-label">Initial Grass Cut – 10,000-14,999 Square Feet  </label><br>
  <input id="71" name="yard[]" class="css-checkbox" type="checkbox" value="Re-Cut – Less than 5,000 Square Feet" />
  <label for="71" name="71" class="css-label">Re-Cut – Less than 5,000 Square Feet </label><br/>

  <input id="72" name="yard[]" class="css-checkbox" type="checkbox" value="Re-Cut – 5,000-9,999 Square Feet" />
  <label for="72" name="72" class="css-label">Re-Cut – 5,000-9,999 Square Feet  </label><br/>

  <input id="73" name="yard[]" class="css-checkbox" type="checkbox" value="Re-Cut – 10,000-14,999 Square Feet" />
  <label for="73" name="73" class="css-label">Re-Cut – 10,000-14,999 Square Feet  </label><br/>

  <input id="74" name="yard[]" class="css-checkbox" type="checkbox" value="Re-Cut – Over 15,000 Square Feet" />
  <label for="74" name="74" class="css-label">Re-Cut – Over 15,000 Square Feet </label><br/>

  <input id="75" name="yard[]" class="css-checkbox" type="checkbox" value="Snow Removal" />
  <label for="75" name="75" class="css-label">Snow Removal </label> <br/>

  <input id="76" name="yard[]" class="css-checkbox" type="checkbox" value="Tree or Shrub Trimming" />
  <label for="76" name="76" class="css-label">Tree or Shrub Trimming   </label><br>
  <input id="77" name="yard[]" class="css-checkbox" type="checkbox" value="Dead Tree Removal" />
  <label for="77" name="77" class="css-label">Dead Tree Removal  </label><br/>

  <input id="78" name="yard[]" class="css-checkbox" type="checkbox" value="Weed Removal" />
  <label for="78" name="78" class="css-label">Weed Removal </label><br/>

</div>

在浏览器中我的标签显示有特殊字符。请帮助我摆脱这个问题我尝试编码也。但仍然无法正常工作

1 个答案:

答案 0 :(得分:0)

这是编码问题。

最佳解决方案是使用Unicode编码保存和显示您的网页。

在文档的最顶部,请注意以下内容:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>[... YOUR PAGE TITLE...]</title>

另外,请确保将html文件另存为utf-8