HTML help

Discuss anything related to the VIC
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

HTML help

Post by Jeff-20 »

I am trying to make a simple table for the front page. I want a cart list with links to our discussions of specific titles. I can't figure out the HTML. I made the table in WordPerfect and coverted it. Each cell redefines the font and format codes making the source code very bloated and slow in my browser. Can someone recommend a way to make tables more efficiently?
High Scores, Links, and Jeff's Basic Games page.
User avatar
Mayhem
High Bidder
Posts: 3027
Joined: Mon May 24, 2004 7:03 am
Website: http://www.mayhem64.co.uk
Location: London

Post by Mayhem »

Do it in Notepad ;)

Seriously though, learning some basic HTML commands and not relying on a program would help a lot to keep the overall size down.

At best, a simple table of say 4 columns and 2 rows could be coded as such:

<table>
<tr>
<td width=a>CONTENT</td>
<td width=b>CONTENT</td>
<td width=c>CONTENT</td>
<td width=d>CONTENT</td>
</tr>

<tr>
<td width=a>CONTENT</td>
<td width=b>CONTENT</td>
<td width=c>CONTENT</td>
<td width=d>CONTENT</td>
</tr>
</table>

You can fiddle with the table and cell borders, the cell width and height etc with other commands within whatever level you see fit.

http://www.mayhem64.co.uk/top10.htm

A little example of basic tables to help the layout...
Lie with passion and be forever damned...
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

it's a pain to update it in notepad. I had hoped for a text editor that would allow for easy updates and slim html. :(
High Scores, Links, and Jeff's Basic Games page.
Thomas Hechelhammer
Vic 20 Dabbler
Posts: 79
Joined: Thu Jun 09, 2005 11:51 pm
Location: Germany

Post by Thomas Hechelhammer »

Jeff-20 wrote:it's a pain to update it in notepad. I had hoped for a text editor that would allow for easy updates and slim html. :(
On a windows-system use edit Plus.

On Linux Quanta+.

These are editors with syntax-highlighting and some clickable htlm-commands (of course tables) are also included.

But, for debugging, you need to know how html works. :wink:

-- Thomas
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Word Perfect, just as little as MS Word, is optimized for web pages. I think they rather output HTML code as one of many formats. Dedicated web page editors may be more slim lined, but it is about being "powerful" and let the user do whatever he wants that results in these horrid HTML constructs. Just like all other programming, there is more than one way to achieve each kind of results, and while you don't want different fonts and colours in each cell, someone else may and WP outputs the most comprehensive code.

Sometimes when you import hand written HTML code into one of the editors, it may retain most of the code even after you made changes. Mayhem's example is a good start. Purists who read the standards may want to add some <TBODY> tags, but I never found any real use or a browser that breaks without it. On the other hand, I never found a browser that breaks without </TR> neither. The </TD> is always good to have, although for simple tables the browser tends to solve it anyway.
Anders Carlsson

Image Image Image Image Image
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Most often, you don't need to set <td width=b>, if you just write <td> then the browser will set a suitable width...

I use WordPad! (Loads really quickly and is better than Notepad as texts that only use LF can be edited...)

I often use tables to format the page, not just for "tables", for example:

<table><tr><td>
<img src="xmenu.png">
</td><td>
For Vic20 (unexpanded and expanded).<br>By <a href="http://home.ica.net/~leifb/commodore/">Leif Bloomquist</a> (V1)
and <a href="http://listen.to/boray">Anders Persson</a> (V2 to V13)<br>
<p><b>
Download: <a href="menu13.zip">menu13.zip</a></b> (Zipped PRG files)<P>
(V13 released 15 June 2005. <a href="#news">News</a>)
</td></tr></table>

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

One easy solution I often use for tables, is to not use tables... I use preformatted text instead:

Code: Select all

<pre>
<b>E-MENU on VICE directory             5 seconds</b>
LOAD"$",8 on 1540:                  10 seconds
LOAD"$",8 on 1541:                  12 seconds
<b>S-MENU with 1541                    13 seconds</b> (V10 to V12)
Dir command on C128 with 1571:      13 seconds
<b>X-MENU with 1541                    15 seconds</b>
Dir command on TheFinalCart3/C64:   16 seconds
Vic Menu V9:                        77 seconds
Vic Menu V1:                        94 seconds

</pre>
/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Did anyone look at the table I am talking about? The source code is ridiculous!

I understand HTML, but I want to be able to go in and edit the list with relative ease. Adding and editing titles while retaining the links would require a more sophisticated text editor. I am suprised this need is not a more common one.
High Scores, Links, and Jeff's Basic Games page.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Yes, I simplified it. Original document was 402 kB, now 49 kB (12%). It may be possible to make it even smaller, but it would make it harder to edit.

http://www.anders.sfks.se/VCtitle.htm

I suppose VCyear.htm, VCman.htm and any other files will need the similar treatment.
Anders Carlsson

Image Image Image Image Image
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Post by tlr »

Jeff-20 wrote:Did anyone look at the table I am talking about? The source code is ridiculous!

I understand HTML, but I want to be able to go in and edit the list with relative ease. Adding and editing titles while retaining the links would require a more sophisticated text editor. I am suprised this need is not a more common one.
Your server runs php. I recommend that you look into it to generate those tables. It is a fairly easy to learn language, and it is very suited for generating html-code from table data without having to insert formatting code and such by hand.
Thomas Hechelhammer
Vic 20 Dabbler
Posts: 79
Joined: Thu Jun 09, 2005 11:51 pm
Location: Germany

Post by Thomas Hechelhammer »

Looking at the source, it looks like being created with some perl or php sheet.

And, with so many items in this list, it would be a pretty good idea putting all the data in a mysql-database and with some modifications you can have sorted lists on your website.

-- Thomas
Leeeeee
soldering master
Posts: 396
Joined: Fri Apr 23, 2004 8:14 am

Post by Leeeeee »

Did anyone look at the table I am talking about? The source code is ridiculous!
Yuk! try this ..

http://www.themotionstore.com/leeedavis ... Ctitle.htm

.. 37K and should work on all but the most brain dead browsers. Even then only the font size and face will be wrong.

I added a copy of the top row to the bottom so you have a definite end to the table instead of it just stopping.

Cheers,

Lee.
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Leee and Carlsson, did you do that manually using find and replace in a text editor? If so, which? Just Notepad? Can I steal. . . um, borrow the code?

I've never had opportunity or reason to investigate php until now. I feel like a dummy; I am just too lazy to learn.
High Scores, Links, and Jeff's Basic Games page.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

I used search and replace (sometimes regexp search and replace) within Emacs, and you are free to replace your page with the one I made.

The big improvement with putting things that repeat in CSS (style sheets) is that you can change the font size, colours, underline etc for the whole file by changing one value.

I agree with the others about a database/PHP solution, but it takes much more work to set up. The good part is that you only need one page and the sorting can be made by the SQL query. You either need a special form for editing the information or a good SQL interface (phpMyAdmin or better) so the updating would not be a pain.
Anders Carlsson

Image Image Image Image Image
User avatar
Mayhem
High Bidder
Posts: 3027
Joined: Mon May 24, 2004 7:03 am
Website: http://www.mayhem64.co.uk
Location: London

Post by Mayhem »

Which was going to be my next suggestions: either style sheets or some sort of database to pull the information out to put in a set format of table page.
Lie with passion and be forever damned...
Post Reply