473,699 Members | 2,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

?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 2410
In article
<11************ **********@i13g 2000prf.googleg roups.com>,
"R. Rajesh Jeba Anbiah" <ng**********@r ediffmail.comwr ote:
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...@r ediffmail.comwr ote:
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...@codesm iths.comwrote:
On 15 Jun, 08:09, "R.RajeshJebaAn biah"
<ng4rrjanb...@r ediffmail.comwr ote:
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**********@r ediffmail.comwr ote:
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...@codesm iths.comwrote:
On Sat, 16 Jun 2007 00:50:52 -0700, "R.RajeshJebaAn biah"
<ng4rrjanb...@r ediffmail.comwr ote:
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...@r ediffmail.comwr ote:
On Jun 16, 5:16 pm, Andy Dingley <ding...@codesm iths.comwrote:
On Sat, 16 Jun 2007 00:50:52 -0700, "R.RajeshJebaAn biah"
<ng4rrjanb...@r ediffmail.comwr ote:
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
1853
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 browser-based editor for *static* HTML pages, like this:
72
5409
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 (dreamweaver and the like), they are all at the lowest level of programming (something like assembly as oposed to C++ etc.). These tools create "brain-dead" developers that constantly have to plough through tons of tags to do the simplest thing. ...
52
4583
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 zero right bracket" Really it needs something more to indicate that it _is_ a date. The brackets would be better done with CSS, :before and content: , but the boss wants it to work under IE too. The site is firmly UK
3
1410
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 Groups (e.g. data tables, look up tables, etc....) Table Fields
9
1551
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 write it, the page will render the same, sans errors, in any browser. All responces will be greatly appreciated. ~Jason Gogela
18
4964
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 overwhelmed by the plethora of different frameworks, templating engines, HTML generation tools etc that exist. After some thought I decided to leave the various frameworks aside for the
7
1728
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 including via SSI a plain text fixed width table (separated by spaces) which of course gets treated as html when doing that. I would like to have the blanks (and line returns) stay in the file and then I could use courier new to display it properly. I
2
1750
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 datagrid column: <asp:TemplateColumn> <ItemStyle CssClass="TableData" Width="15%"></ItemStyle> <ItemTemplate> <a href="<%# ShowURL(DataBinder.Eval(Container.DataItem,
59
3653
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 about the fact that IE doesn't support CSS tables. But what can one do about that? And tables of one type or the other are needed in some cases (regardless of whether some people feel it is appropriate or not). So the issue I and considering...
0
8685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9172
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8908
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7745
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6532
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.