Forum Settings
Forums
New
May 17, 2016 12:17 PM
#1
Offline
Mar 2011
3
How do you think code of this slice of page should be like?



If you are thinking

─ h2/h3
┌ table
├ row (header)
├─ rows (using th tags - used for header columns, google)
├ row (anime)
├─ rows (using td tags)
├ row (anime)
├─ rows (using td tags)
─ div (stats)

Then you are correct.

Instead the developer uses this structure:

table→row→column→span (for header)
table→row→column (x5) (for table header columns)
table→row→column (x5) (for first anime in the list)
table→row→column (x5) (for second anime in the list)
table→row→column (for stats)

It has the remnants of the 90s. It's invalid and asemantic HTML.
This is XHTML4, we are not living in 90s anymore.
HTML5 has been here at least for 15 years, it's time to upgrade the layout.

Here's what wrong:


  • there are no id attributes to differentiate the tables, so it's nearly impossible to apply CSS to them because developer doesn't use any classes or ids to make them distinguishable from other tables.
  • Every category (watching, completed, on-hold, dropped) should have ids for them. table for watching should have id table-watching, completed series table should have table-completed for id, etc.


This is what every table looks like in Anime/Manga page (including headers, stats, and everything else):

<table border="0" cellpadding="0" cellspacing="0" width="100%">

Header column rows use <strong> to make them bold, this is too much HTML and bloats the page.

Instead you can use a CSS like below for every category table (watching, completed)

.table-category th {
font-weight: bold
}

Links such as Edit and More uses <div style="float: right"> to make them show on right, this is also too much code and can be shortened using CSS only:

.table-user-action {
float: right;
display: inline-block;
}

If A(HREF) tags use the class "table-user-action", you don't have to DIV tags anymore.

If you look at this image



Many of these scripts and stylesheets are not concatenated, increasing page load more than it should be. HTTP1 can't handle lots of simultaneous connections at once (max 6 but changeable) because many connections means increase in load time.

6 of these scripts can be combined into 1.
5 of these stylesheets can be combined into 1.

I can't tell you how slow this site is because of this bloated HTML, I really think you should reconsider restructuring the page layouts.

p.s.: I'm a web developer with >9 years of experience.
dxcMay 19, 2016 12:22 PM
May 22, 2016 9:06 PM
#2

Offline
Feb 2013
6196
You must have looked at the "classic" list markup. Yes, it's bad and everyone here knows it.

Check out the "modern" list markup. It's ever so slightly less terrible. (but burdened by horrible load-300-entries-at-a-time ajax nonsense so it's slower and I don't use it)

You've been here since 2011 and only noticed this now?
It really shows how talented some of the users here are, considering the amazing things they do with their lists even with the horrendous markup.

More topics from this board

» An option to hide Explicit Genres from anime/manga list

animegamer245 - Yesterday

3 by traed »»
11 hours ago

» Add an option to view (and display) ratings with a 5 star scale (allowing half stars)

Bergioyn - May 6

3 by Bergioyn »»
May 7, 2:10 PM

» New category for manga lists

Aristotle417 - May 7

0 by Aristotle417 »»
May 7, 11:05 AM

» forum rules and blogs

leyaf - May 5

3 by S_h_a_r_k_93 »»
May 7, 1:03 AM

» [QoL] Allow more than 9 items in My Last List Updates

anonymate - Mar 25

4 by S_h_a_r_k_93 »»
May 7, 12:24 AM
It’s time to ditch the text file.
Keep track of your anime easily by creating your own list.
Sign Up Login