Reply to Is this good code? Good practice advice needed...

Your name:

Reply:


Posted by SM on 11/08/07 20:01

Hello,

I've created a gallery of photos in php. The model is very simple:
Album/subalbum/photos.
If the user clicks on an album, a bunch of subalbums appear. And if
the user selects one of the subalbum, a gallery of photos appear.

The gallery of photos appear right beneath the subalbum list item
selected by the user. I've tested everything and the result is prety
cool.

Now, because im trying to be compiant with HTML/XHTML, and mostly
because im trying to create good code, i was wondering if the piece of
code is OK.

Even though everything works ok, i was wondering for example if i can
insert a <div> between an <li>.
Is it better to put an <a> inside a <ul><li> when im constructiing a
list?


This is a sample of the code. Notice the insertion of the gallery
beneath the <li> selected by the user.
....
<!-- CONTENT_RIGHT -->
<div id="content_right">
<ul>
<li><a href="#">Gallery One</a></li>
<li><a href="#">Sky</a></li>
<li><a href="#">Hello World</a></li>
<li><a href="#">Tribute</a></li>
<div id="thumbnail">
<a href="#"><img src="images/photography/1.jpg" /></a>
<a href="#"><img src="images/photography/2.jpg" /></a>
<a href="#"><img src="images/photography/3.jpg" /></a>
<a href="#"><img src="images/photography/4.jpg" /></a>
<a href="#"><img src="images/photography/5.jpg" /></a>
</div>

<li><a href="#">Cloud 9</a></li>
<li><a href="#">The End</a></li>
</ul>
</div>
......

Is this good code?

Thanks
Marco

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация