Sp 306

From Htmlpedia
Jump to: navigation, search

OpenSP: Document type "..." already defined

Cause:

The document type has already been defined. This can happen if the DOCTYPE has been specified more than once.

Example:

Bad

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
....

Good

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
<html>
....

Solution:

Remove one of the declaration.

References: