“Start tag head seen but an element of the same type was already open”, but I don’t have a duplicate <head>

走远了吗. 提交于 2019-12-02 12:08:24

In your third line you have a <meta charset="utf-8"> before your <head> start tag. Having a meta element after the <html> start tag automatically opens the head element before the meta element, which causes your explicit <head> tag to be detected as a duplicate.

Simply move your <meta charset="utf-8"> underneath the <head> tag to resolve this error:

<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<style>table,th, td{border:1.5px solid red;} td{ padding: 15px;}</style>
<title> Index </title>
</head>

(You can also remove the <head> tag entirely and it would validate, too, but having a </head> end tag without its start tag looks funny, even if the start tag isn't strictly necessary.)

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