Ir para conteúdo

Arquivado

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

olliver

W3C não valida xhtml, não entendi os erros

Recommended Posts

Pessoal, seguinte...

 

to trabalhando num xhtml aqui e tentei validá-lo no W3C, mas to com 5 erros que não to entendendo o motivo...

São mais específicos num menu dropdown que to fazendo. seguem os erros gerados:

 

 

end tag for X omitted, but OMITTAG NO was specified

1. Line 25, column 9: end tag for "li" omitted, but OMITTAG NO was specified

</strong>

2. Line 25, column 9: end tag for "ul" omitted, but OMITTAG NO was specified

</strong>

 

document type does not allow element X here; missing one of Y start-tag

3. Line 22, column 25: document type does not allow element "ul" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

<ul id="menu_dropdown">

4. Line 26, column 7: document type does not allow element "ul" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

<ul>

 

end tag for element X which is not open

5. Line 35, column 7: end tag for element "ul" which is not open

</ul> So, tanks for visit, you're

 

 

O codigo completo da página é o seguinte:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Title here</title>

<!-- load CSS external file -->
<link href="screen.css" rel="stylesheet" type="text/css"/>

</head>

<body>

<br />
<br />

<!-- HEADER HomePage -->
<div id="header"> 
  <h1>
	<strong>
	  <!-- DROPDOWN rollover menu, logo -->
	  <ul id="menu_dropdown">
		<li>
		  <a href="#" title="Go to home!"></a>
	</strong>
		  <ul>
			<li><a href="#" title="About">About</a></li> 
			<li><a href="#" title="Portfolio">Portfolio</a></li>
			<li><a href="#" title="Projects">Projects</a></li>
			<li><a href="#" title="Ideas">Ideas</a></li>
			<li><a href="#" title="Contact">Contact</a></li>
		  </ul> 
	  </ul> So, tanks for visit, you're 
			<a href="#">Welcome</a> here!<br />See my 
		  <a href="#">ideas</a>, 
		  <a href="#">works</a> and find out more 
		  <a href="#">about me</a>.
  </h1>
</div>

<!-- NEWS HomePage -->
	<div id="featured">
	  <div class="first">
		<h2>
			<a href="#" title="Portfolio">Portfolio</a>
		</h2>				
		<a href="#" title="Portfolio Title Message">
			<img src="thumb_001.jpg" alt="Portfolio Alt Message"></img>
		</a>
		<p>The XXXX Website is a recently web creater in Flash with xml & php administration.</p> 		
	  </div>
	  
	  <div class="first">
		<h2>
			<a href="#" title="Projects">Projects</a>
		</h2>
		<a href="#" title="Projects Title Message">
			<img src="thumb_002.jpg" alt="Projects Alt Message”"></img>
		</a>
		<p>The XXXX Website is a recently web creater in Flash with xml & php administration.</p> 				
	  </div>
	  
	  <div class="first">
		<h2>
			<a href="#" title="Works & Ambitions"> Works & Ambitions</a>
		</h2>
			<a href="#" title="Projects Title Message">
				<img src="thumb_003.jpg" alt="Projects Alt Message"></img>
			</a>
		<p>The XXXX Website is a recently web creater in Flash with xml & php administration.</p> 				
	  </div>
	  
	  <div class="first">
		<h2>
			<a href="#" title="Contact & Address">Contact & Address</a>
		</h2>
		<a href="#" title="Projects Title Message">
			<img src="thumb_004.jpg" alt="Projects Alt Message"></img>
		</a>
		<p>The XXXX Website is a recently web creater in Flash with xml & php administration.</p> 				
	  </div>
	</div>

	<div id="laboratory">
	  <div class="laboratory_content">
		<h3><a href="#" title="Lastest Experiments">Lastest Experiments</a></h3>
		  <p><a href="#" title="Acess this experiment">• Work with php+mySQL Session Admin, incremented with xml >> </a></p>
		  <p><a href="#" title="Acess this experiment">• Tableless portfolio 2.0c, news list from SQL database >> </a></p>
		  <p><a href="#" title="Acess this experiment">• New Adobe Flash CS4 trial available, enjoy it >> </a></p>
	  </div>
</div>

<div id="space"></div>

<!-- BOTTOM Bar -->
<div id="bottom">
  <a href="#">Cavalaro 2005-2009</a>. Create with 
  <a href="#" title="Check the CSS Validation" target="_blank">CSS</a> and
  <a href="#" title="Check the XHTML Validation" target="_blank">XHTML</a> tolls, for better 
  <a href="#" title="View the accessibility validation"  target="_blank">accessibility</a>.
</div>

</body>
</html>

 

Alguém tem alguma idéia desses erros??

 

Obrigado.

Rafael

Compartilhar este post


Link para o post
Compartilhar em outros sites

Faltou fechar um LI.. olha ele ai:

<ul id="menu_dropdown">
		<li><!-- você não tinha fechado esse li -->
		  <a href="#" title="Go to home!"></a>
		  <ul>
			<li><a href="#" title="About">About</a></li> 
			<li><a href="#" title="Portfolio">Portfolio</a></li>
			<li><a href="#" title="Projects">Projects</a></li>
			<li><a href="#" title="Ideas">Ideas</a></li>
			<li><a href="#" title="Contact">Contact</a></li>
		  </ul> 
		</li><!-- tava faltando fechar aqui -->
	  </ul>
Tenta ai.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Valeu William,

isso realmente tava faltando, mas os erros que ele ta acusando são estranhos (agora subiu p/ 6 erros)...

diz que to fechando uma tag que não ta aberta...

 

bom, continuam os mesmos 5 erros, agora com mais esse ae:

 

Line 36, Column 7: end tag for element "ul" which is not open.

</ul> So, tanks for visit, you're

description: The Validator found an end tag for the above element, but that element is not currently open.

 

Obrigado.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Cara.... o problema é esse strong que é um elemento inline, e UL é nivel de bloco.

você não pode colocar um bloco dentro de um inline.

E também não faz o menor sentido o teu UL estar dentro de um h1... reveja essa marcação.... use CSS para ajeitar isso.

O correto desse bloco, é esse:

<div id="header"> 
  <h1><strong></strong></h1>
	  <!-- DROPDOWN rollover menu, logo -->
	  <ul id="menu_dropdown">
		<li>
		  <a href="#" title="Go to home!"></a>
		  <ul>
			<li><a href="#" title="About">About</a></li> 
			<li><a href="#" title="Portfolio">Portfolio</a></li>
			<li><a href="#" title="Projects">Projects</a></li>
			<li><a href="#" title="Ideas">Ideas</a></li>
			<li><a href="#" title="Contact">Contact</a></li>
		  </ul> 
		</li>
	  </ul> So, tanks for visit, you're 
			<a href="#">Welcome</a> here!<br />See my 
		  <a href="#">ideas</a>, 
		  <a href="#">works</a> and find out more 
		  <a href="#">about me</a>.
</div><!-- /header -->

Compartilhar este post


Link para o post
Compartilhar em outros sites

E outro detalhe: que coerência existe utilizar um <strong> dentro de um <h1>, sendo que, por padrão, a <h1> já deixa o conteúdo em negrito? http://forum.imasters.com.br/public/style_emoticons/default/assobiando.gif

 

Ou seja, não é necessário ter a tag <strong> dentro do <h1>... Veja bem, o validador não acusa erro porque, em termos de código, não há erro, mas há um erro de coerência...

 

http://forum.imasters.com.br/public/style_emoticons/default/thumbsup.gif

Compartilhar este post


Link para o post
Compartilhar em outros sites

Pessoal, valeu pela ajuda...

 

reformulei algumas coisas dos códigos e consegui validar naquilo q tinha perguntado...

só to com mais 3 problemas:

 

No se proporciona información sobre documentos relacionados (usando <link>, por ejemplo).

Los elementos <link> con atributos "rel" o "rev" permiten dar información acerca de la relación entre la página actual y otros recursos.

<link rel="stylesheet" type="text/css" href="screen.css" />

Property overflow-x doesn't exist in CSS level 2.1 but exists in [css3] : hidden

ps: tbm ta dando erro p a barra y... coloquei isso ae p esconder os scroll horizontal e vertical.

To fazendo tudo em CSS2.1 e um validador recomenda CSS3 pra esconder as barras.

html { 
overflow-x: hidden; 
overflow-y: hidden; 
}

#menu_dropdown li ul __ Parse Error Opacity=70, FinishOpacity=100, Style=1, StartX=0, StartY=90, FinishX=0, FinishY=5)

#menu_dropdown li ul __ Property opacity doesn't exist in CSS level 2.1 but exists in [css3] : 0.85

usei esse código p/ dar o efeito alpha no menu... um cod. p/ o IE e outro p/ FF & MZ.

O código que to usando por enquanto é esse:

#menu_dropdown li ul {
background:#C93B0E; 
filter: alpha(Opacity=70, FinishOpacity=100, Style=1, StartX=0, StartY=90, FinishX=0, FinishY=5); /* alpha IE */
opacity: 0.85; /* alpha FF & MZ */
}

O Paulo (AprendizCSS) indicou em outro tópico o uso de JQuery pra resolver isso. Tentei usar alguma coisa do cod. que usei em CSS e entao ficou assim:

 

<script src="jquery.js" type="text/javascript"></script>
<script type="text/javascript">
	$(document).ready(function(){
	$("#teste").load("mouseenter",function(){
	$(this).animate({opacity:0.6, finishopacity:0.3, style:1, startX:90, startY:90, finishX:10, finishY:0.10},300);
	});
	});
</script>

Com isso ae em cima, funciona só até a opacidade com valor 0.6 (em 0,3s), mas o restante ele não interpreta... ou seja, fica com opacidade homogênea, sem efeito de transparência gradiente...

 

Alguma ajuda mais?

abraço

Compartilhar este post


Link para o post
Compartilhar em outros sites

Olá,

 

Esses avisos você sabe porque dão, certo?

Até CSS3 estiver desenvolvido e completo, esses avisos deixaram de existir..

 

No que toca à transparência, o melhor é mesmo perguntar no Fórum JS como o amigo Paulo falou ;).

 

Cumprimentos,

webflex

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.