Home  >  Article  >  Web Front-end  >  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
WBOYOriginal
2016-06-24 12:07:461389browse

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: c5b5b4350adc193d659abbcb630e24d8The 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>
The above is wrong, but

only Just use the f5e863264bc2408b28cf4a1719cf43ef element to wrap the d5fd7aea971a85678ba271703566ebfd element

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

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

Statement:
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