473,403 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

?Ideal HTML markup to display record list

What would be the ideal HTML markup for the following list of records
(except table)?

Student-1:
Marks:
Math : 100
Science : 100
History : 100

Student-2:
Marks:
Math : 90
Science : 90
History : 90

Student-3:
Marks:
Math : 80
Science : 80
History : 80

what I tried:

<ol>
<li>
<h2>Student-1</h2>
<h3>Marks</h3>
<ul>
<li>Math : 100</li>
<li>Science : 100</li>
<li>History : 100</li>
</ul>
</li>
...
</ol>

Problem with the above:
The use of colon in the list (i.e, History : 100) looks weird

Any comments is highly appreciated. TIA

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jun 15 '07 #1
7 2396
In article
<11**********************@i13g2000prf.googlegroups .com>,
"R. Rajesh Jeba Anbiah" <ng**********@rediffmail.comwrote:
What would be the ideal HTML markup for the following list of records
(except table)?

Student-1:
Marks:
Math : 100
Science : 100
History : 100

Student-2:
You mean like a judge might wonder, where apart from jail, would
be the best place to keep a murdering thieving no-good low-down
criminal who has been caught and tried and convicted?

It is a table. There is the student, the subjects and the marks.
Are you trying to stop the students feeling hurt by comparisons
with their fellows by displaying the results in too easily read a
manner?

--
dorayme
Jun 15 '07 #2
On 15 Jun, 08:09, "R. Rajesh Jeba Anbiah"
<ng4rrjanb...@rediffmail.comwrote:
What would be the ideal HTML markup for the following list of records
(except table)?
Table is good! Why do you have a problem with it?

You have two or three levels of structure here: a list of students and
some structure for each student. For the students' marks, you're using
a two-dimensional grid-like structure of subjects and name/value
pairs. That "grid like" structure is very much a candidate for a
<table-- it's the simplest way to achieve "grids" in HTML + CSS.

That's a solution with a <tableper student. Another approach would
be one table overall, and probably using colspan on the student
"header" rows. Again, this is perfectly respectable web design.

If you _must_ avoid <table>s (and this is pointless, except as an
exercise), then you can still do it. Try something like this:

<ul class="students" >
<li>
<h2>Student-1</h2>
<h3>Marks</h3>
<ul class="marks" >
<li><span class="subject" >Math</span: <span class="result"
>100</span></li>
<li><span class="subject" >Science</span: <span
class="result" >100</span></li>
<li><span class="subject" >History</span: <span
class="result" >100</span></li>
</ul>
</li>
...
</ul>

You'd need to set widths on .subject, so as to get the marks table to
align correctly.

You could use CSS generated content and .subject:after to replace the
colon too, which is neat but not too widely supported by the browsers.
I'd probably do it that way - it's not crucial that all users see it.

Note that I've put classes on the <ul>

I'd also avoid <olin favour of <ul>. Add your own numbers explicitly
if you need them - generated numbers from CSS are rarely adequate for
anything.

You could make the HTML here more compact, at the cost of more
complexity and less flexibility. I wouldn't though, keep it simple,
even if that's a bit verbose.

Jun 15 '07 #3
R. Rajesh Jeba Anbiah wrote:
What would be the ideal HTML markup for the following list of records
(except table)?

Student-1:
Marks:
Math : 100
Science : 100
History : 100
....

As others have said, you have tabular data there. There seems to be some
misconception that tables are invalid, this is completely incorrect.
Tables are just fine, for tabular data. What is discourage, but not
"illegal" is using table as a framework to layout the whole page.

Got a table then use a table...

<table>
<tr>
<th>Student-1</th>
<th>Marks</th>
</tr>
<tr>
<td>Math</td>
<td>100</td>
</tr>
<tr>
<td>Science</td>
<td>100</td>
</tr>
<tr>
<td>History</td>
<td>100</td>
</tr>
</table>
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jun 15 '07 #4
On Jun 15, 2:44 pm, Andy Dingley <ding...@codesmiths.comwrote:
On 15 Jun, 08:09, "R.RajeshJebaAnbiah"
<ng4rrjanb...@rediffmail.comwrote:
What would be the ideal HTML markup for the following list of records
(except table)?

Table is good! Why do you have a problem with it?
<snip>

(Many thanks for everyone who is replied in this thread)

You cannot let it display like shopping sites' grid like iterface
(Instead of student DB, if you could think it like products DB with
product name, price, rank, etc)

<snip>
Note that I've put classes on the <ul>

I'd also avoid <olin favour of <ul>. Add your own numbers explicitly
if you need them - generated numbers from CSS are rarely adequate for
anything.
<snip>

I prefer <olover <ulas without CSS it provides, clean and
readable look, YMMV.

Thanks again.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jun 16 '07 #5
On Sat, 16 Jun 2007 00:50:52 -0700, "R. Rajesh Jeba Anbiah"
<ng**********@rediffmail.comwrote:
You cannot let it display like shopping sites' grid like iterface
Then use CSS
Jun 16 '07 #6
On Jun 16, 5:16 pm, Andy Dingley <ding...@codesmiths.comwrote:
On Sat, 16 Jun 2007 00:50:52 -0700, "R.RajeshJebaAnbiah"
<ng4rrjanb...@rediffmail.comwrote:
You cannot let it display like shopping sites' grid like iterface

Then use CSS
I suppose, you mean <olor <ulwith CSS--not <tablewith CSS

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jun 16 '07 #7
On 16 Jun, 15:14, "R. Rajesh Jeba Anbiah"
<ng4rrjanb...@rediffmail.comwrote:
On Jun 16, 5:16 pm, Andy Dingley <ding...@codesmiths.comwrote:
On Sat, 16 Jun 2007 00:50:52 -0700, "R.RajeshJebaAnbiah"
<ng4rrjanb...@rediffmail.comwrote:
You cannot let it display like shopping sites' grid like iterface
Then use CSS

I suppose, you mean <olor <ulwith CSS--not <tablewith CSS
No, I mean to use CSS to style the <tableso that it's no longer like
"shopping sites' grid like iterface"

You could also use CSS to style a <ullist.

I don't understand your preference for <ol"as without CSS it
provides, clean and readable look" either. How much of a real problem
is lack of CSS support going to be to you? That's a pretty rare
problem these days.

Jun 18 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David Winter | last post by:
I'm not a developer myself, but I am looking for something that maybe one of you guys - has done - knows about - would like to do - yes, I have a small budget for this. :) The basic idea: A...
72
by: Mel | last post by:
Are we going backwards ? (please excuse my spelling...) In my opinion an absolute YES ! Take a look at what we are doing ! we create TAGS, things like <H1> etc. and although there are tools...
52
by: Andy Dingley | last post by:
I'm using this at present: <p title="Publication date" ></p> Works fine on screen, but Fangs/Jaws just reads it as "left bracket twenty-eight slash zero slash two thousand five fifteen colon...
3
by: WindAndWaves | last post by:
Hi Friends I am thinking about making an HTML library of all my objects in my database. Has anyone done this before???? Keen to get your ideas. Here is the structure of my library: Table...
9
by: Jason Gogela | last post by:
Does anyone out there know why I should care whether a <span> is nested in a <p> or vice versa? What is the bennafit of adhering to this standard? It seems to me that regardless of which way you...
18
by: pkassianidis | last post by:
Hello everybody, I am in the process of writing my very first web application in Python, and I need a way to generate dynamic HTML pages with data from a database. I have to say I am...
7
by: toby989 | last post by:
Hi All Sorry for reposting...the entries of the post from 11/23/2005 by Eric Lindsay have been removed from the server already and I am seeing only the header. So, I have the problem of...
2
by: Joe | last post by:
Hello All: I am writing to ask for your opinions. I have a colleague who combines his code with the markup used to display the code (reckoning back to classic ASP). Here's an example of a...
59
by: phil-news-nospam | last post by:
In followups by Brian O'Connor (ironcorona) to other posts, he repeats the idea that using tables in CSS is not something that should be done because IE doesn't support it. Of course I'm not happy...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.