Home > Web Front-end > HTML Tutorial > Two problems that occurred during w3c inspection and their solutions_html/css_WEB-ITnose

Two problems that occurred during w3c inspection and their solutions_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:07:46
Original
1410 people have browsed it

Let’s take a look at the results of the solution first

Verification website: http://validator.w3.org/

Warning Byte-Order Mark found in UTF-8 File.

The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported.

(Translation: UTF-8 numbered files with BOM will have some problems in old browsers. It is recommended that you use other encoding formats to achieve Better compatibility... I don’t know if it’s misleading. Hehe)

Solution

: Use Notepad or other editors (I don’t know if vim can be used? I don’t know. Please tell me if you know~), Change the encoding to UTF-8 encoding without BOM

document type does not allow element "input" here

missing one of "p", "h1", "h2", "h3", "h4 ", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag

(Translation: The element needs to be in "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", " fieldset", "ins", "del")

For example,

1 <form>2     <input type="text" name="keywords" />3 </form>
Copy after login
The above is wrong, but

only Just use the element to wrap the element

<form>    <fielset>        <input type="text" name="keywords" />    </fielset></form>
Copy after login
In addition,

in xhtml, all tags need to be closed . For example, , For example,

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template