By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,766 Members | 1,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,766 IT Pros & Developers. It's quick & easy.

HTML Display Correctly, But Not Right

P: n/a
The following HTML displays how I want it to, in both MSIE and Mozilla,
howerver, an online validator gives me all sorts of error messages. Can
someone suggest a way to make it more "kosher"?

It is generated from a Unix script that I wrote
<HTML>
<FONT SIZE = 10>
<PRE>
<STRONG>
August 2004
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

</STRONG>
</PRE>
</FONT>
<FONT SIZE=6>
<PRE>
</STRONG>
July 2004 September 2004
Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
1 2 3 1 2 3 4
4 5 6 7 8 9 10 5 6 7 8 9 10 11
11 12 13 14 15 16 17 12 13 14 15 16 17 18
18 19 20 21 22 23 24 19 20 21 22 23 24 25
25 26 27 28 29 30 31 26 27 28 29 30

</PRE>
</HTML>
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Buck Turgidson wrote:
The following HTML displays how I want it to, in both MSIE and Mozilla,
howerver, an online validator gives me all sorts of error messages. Can
someone suggest a way to make it more "kosher"?

<HTML>
A title is required.
<FONT SIZE = 10>
The font element is obsolete, can't contain block elements (like <pre>) and
only goes up to 7 anyway. Use CSS instead.

http://htmlhelp.com/reference/css/
<PRE>

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 20 '05 #2

P: n/a
Buck Turgidson wrote:
The following HTML displays how I want it to, in both MSIE and Mozilla,
howerver, an online validator gives me all sorts of error messages. Can
someone suggest a way to make it more "kosher"?

It is generated from a Unix script that I wrote


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<title>Some title for the document</title>
<style type="text/css">pre { font-weight: bolder; }</style>
</head>
<body>
<pre>
August 2004
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
</pre><pre>
July 2004
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
</pre><pre>
September 2004
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
</pre>
</body>
</html>

Add some CSS to position the PRE elements as you wish (margins, position
etc). Before, it didn't read linerarly (as if read left to right).

HTH

--
Matt
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 20 '05 #3

P: n/a

"Buck Turgidson" <jc***@hotmail.com> wrote in message
news:_u*********************@cyclops.nntpserver.co m...
The following HTML displays how I want it to, in both MSIE and Mozilla,
howerver, an online validator gives me all sorts of error messages. Can
someone suggest a way to make it more "kosher"?


By fixing the errors reported by the validator, no?

Jul 20 '05 #4

P: n/a
David Dorward <do*****@yahoo.com> wrote in
news:ce*******************@news.demon.co.uk:
Buck Turgidson wrote:
The following HTML displays how I want it to, in both MSIE and
Mozilla, howerver, an online validator gives me all sorts of error
messages. Can someone suggest a way to make it more "kosher"?

<HTML>


A title is required.
<FONT SIZE = 10>


The font element is obsolete, can't contain block elements (like
<pre>) and only goes up to 7 anyway. Use CSS instead.

http://htmlhelp.com/reference/css/


Buck, you also should put a DOCTYPE at the beginning of your document.
Help on choosing a DOCTYPE:
<http://www.htmlhelp.com/tools/validator/doctype.html>.

The W3C validator at <http://validator.w3.org/> really enjoys flipping
out over all the errors like an unmuted car alarm. You might want to use
the WDG validator at <http://www.htmlhelp.com/tools/validator/>, which
catches the same errors, but is friendlier about them.

--
Accessible web designs go easily unnoticed;
the others are remembered and avoided forever.
Jul 20 '05 #5

P: n/a
"Buck Turgidson" <jc***@hotmail.com> wrote:
The following HTML displays how I want it to, in both MSIE and
Mozilla, howerver, an online validator gives me all sorts of error
messages. Can someone suggest a way to make it more "kosher"?


You haven't explained why the page presents the calendars, but generally,
before trying to get the current markup right by fixing the errors,
I would suggest considering whether another approach might be better.
In principle at least, a table is preferable to <pre> for the purpose of
presenting tabular data, and a calendar is pretty much tabular data.

In particular, if you put calendars of two months side by side inside a
single <pre>, it becomes rather hard to understand when spoken by a
speech browser. It's better to make each month a table, then perhaps
consider displaying them side by side.

But what do you present the calendars for? Are some of the day numbers
links to something. For a calendar of events, for example, a different
approach is usually better (e.g., a simple list of dates in chronological
order, containing only dates with some event).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.