Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Marrinha

Validar uma pagina com codigo PHP

Recommended Posts

estou tentando validar minha pagina... ela ta toda valida só que tem um codigo em PHP no meio dela.como que faço pra omitir essas linhas em PHP.

Compartilhar este post


Link para o post
Compartilhar em outros sites

As linha do PHP não vao interferir na validação, porque são interpretadas.O validador avalia a saída html.Qual erro que dá na validação ?

Compartilhar este post


Link para o post
Compartilhar em outros sites

1. Error  Line 32 column 3: "DOCTYPE" declaration not allowed in instance.	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.o

 

2. Error  Line 33 column 42: document type does not allow element "html" here.<html xmlns="http://www.w3.org/1999/xhtml">The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

nessas duas linhas eh onde se encontra o inicio do codigo php!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Pois é, os erros são relativos a XHTML.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.