In a HTML file with charset=utf-8, do I still need to replace umlauts with ä?

拥有回忆 提交于 2019-12-03 22:18:07

When I set the charset of a HTML file to UTF-8 by putting <meta charset="utf-8"> into the header

That doesn't set the character encoding. It declares which character encoding you are using. You must also make sure you are saving the HTML using that encoding.

Given that then:

do I still need to replace ä by &auml;, ö by &ouml; and so on?

No. Only characters with special meaning in HTML (<, >, &, ", ' … all of which only have special meaning in some contexts) must be replaced with character references.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!