html problem with definition and ordered list

problem with definition and ordered list

Page 1 of 1

5 Replies - 1168 Views - Last Post: 24 November 2008 - 06:51 AM

#1 MrIce  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 01-May 06

html problem with definition and ordered list

Post icon  Posted 24 November 2008 - 04:33 AM

I've been strugling with this problem like a day or so... now I give up. It just doesn't go true the validation proces. Something is wrong and I don't know how to fix this/writte this in sequence.

Here's my code:

<dl> 
	<dt>Slovenska portala:
	</dt> 
		<dd> 
		<ul> 
			<li>
			<a href="http://www.slo-foto.net" target="_blank">Slo Foto</a>
			</li> 
		</ul> 
		</dd> 
	
		<dd> 
		<ul> 
			<li>
			<a href="http://www.e-fotografija.si" target="_blank">E-fotografija</a>
			</li> 
		</ul> 
		</dd> 
</dl>
	Tuje spletne strani:
	<ol> 
		<li>
			<a href="http://www.dpreview.com" target="_blank">dPreview</a>  
		</li>
		<li>
			<a href="http://www.gsmarena.com" target="_blank">GsmArena</a>
		</li>
		<li>
			<a href="http://www.phonearena.com" target="_blank">PhoneArena</a>
		</li> 
	</ol> 


The first unordered list is in my opinion good, cause it's not "ordered". :D Now, I want to put the ordered list also in definition list. But I get errors, while validating.

Here is the code , where in second part (ordered list), I get errors.
<dl> 
	<dt>Slovenska portala:
	</dt> 
		<dd> 
		<ul> 
			<li>
			<a href="http://www.slo-foto.net" target="_blank">Slo Foto</a>
			</li> 
		</ul> 
		</dd> 
	
		<dd> 
		<ul> 
			<li>
			<a href="http://www.e-fotografija.si" target="_blank">E-fotografija</a>
			</li> 
		</ul> 
		</dd> 
	<dt>Tuje spletne strani:
	</dt>
		<ol> 
		<li>
			<dd>
			<a href="http://www.dpreview.com" target="_blank">dPreview</a>  
			</dd>	
		</li>
		<li>
			<dd>
			<a href="http://www.gsmarena.com" target="_blank">GsmArena</a>
			</dd>
		</li>
		<li>
			<dd>
			<a href="http://www.phonearena.com" target="_blank">PhoneArena</a>
			</dd>
		</li> 
	</ol>
</dl>



Is This A Good Question/Topic? 0
  • +

Replies To: html problem with definition and ordered list

#2 MrIce  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 01-May 06

Re: html problem with definition and ordered list

Posted 24 November 2008 - 04:40 AM

Here you can take a look, what validation tool Tidy recomends and what's the result of his "clean" code, which passes validation. Link
Was This Post Helpful? 0
  • +
  • -

#3 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 6084
  • View blog
  • Posts: 10,521
  • Joined: 28-September 07

Re: html problem with definition and ordered list

Posted 24 November 2008 - 05:17 AM

First of all, the code DOES pass validation. You have no errors, only a warning.

You should be able to get rid of this by opening the file in Notepad++, check Format --> UTF without BOM and re-saving the file.

Hope this helps!
Was This Post Helpful? 0
  • +
  • -

#4 MrIce  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 01-May 06

Re: html problem with definition and ordered list

Posted 24 November 2008 - 05:23 AM

Are u sure? Because my file doesn't get true the validation. Here is the original html page, whit wich I work.
Was This Post Helpful? 0
  • +
  • -

#5 gothik12  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 6
  • View blog
  • Posts: 207
  • Joined: 10-November 07

Re: html problem with definition and ordered list

Posted 24 November 2008 - 06:41 AM

So, first of all you have opened some tags and you didn't close them. Afterward, you've used at the first unordered list more <dd> tags and your result might not had been the one you expected.

Ok, I reedited your page, and now it's valid because I've verified it . Make the difference between yours and mine, I won't start now to explain the details:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title></title>
</head>
<body>
<dl> 
<dt>Slovenska portala:</dt> 
		<dd> 
		<ul> 
			<li>
			<a href="http://www.slo-foto.net" target="_blank">Slo Foto</a>
			</li> 
		
			<li>
			<a href="http://www.e-fotografija.si" target="_blank">E-fotografija</a>
			</li> 
		</ul> 
		</dd> 
<dt>Tuje spletne strani:</dt>
			<dd>
			<ol>
			
			
			<li>
			<a href="http://www.dpreview.com" target="_blank">dPreview</a>  
			</li>
		
			<li>
			<a href="http://www.gsmarena.com" target="_blank">GsmArena</a>
			</li>
			
			<li>
			<a href="http://www.phonearena.com" target="_blank">PhoneArena</a>
			</li>
			</ol>
			</dd>
			
</dl>
	<p><a href="http://ferisrv5.uni-mb.si/~mm0277/vaja3/osnova.html">Go to previous page </a> or <br />

	<a href="http://ferisrv5.uni-mb.si/~mm0277/"> go back to main page!</a></p>

	<p> <a href="http://validator.w3.org/check?uri=referer">
	<img src="http://www.w3.org/Icons/valid-xhtml10-blue" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a> 
	</p> 

</body>
</html>



P.S.: You're welcome :) .
Was This Post Helpful? 0
  • +
  • -

#6 MrIce  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 01-May 06

Re: html problem with definition and ordered list

Posted 24 November 2008 - 06:51 AM

What a joke. I tought, I had to put dd tags in front of every single list item. :rolleyes: I don't know, how I didn't try this myself... thank you! :^:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1