Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Complete newbie question

Reply
Thread Tools

Complete newbie question

 
 
Stephen Glynn
Guest
Posts: n/a
 
      07-02-2004
Can anyone advise me on this or suggest a group where I might seek help?

I'm trying to work through an introductory exercise in QUE books' "Using
HTML". This involves writing some text in notepad and then adding
tags to produce a basic home page for some imaginary family.

What they tell me to enter is

<HTML>
<HEAD>
<TITLE>The Fayne Family Page</TITLE>
</HEAD>
<BODY bgcolor="FFFFFF" text="000000" link = "0000FF" alink="FF0000"
vlink="800000>

<H1>The Fayne Family Page</H1>
<H2>Who We Are</H2>
<P>

.... some text...

<H2>Where We Live</H2>
<P>

.... some more text ...

<H2>Our Special Interests</H2>
<P>
.... some more text ...

<H2>Fun Places We've Been</H2>
<P>
.... yet more text ...
</BODY>
</HTML>

This causes the first two paragraphs to vanish, though the last two --
"Our Special Interests" and "Fun Places We've Been" -- display as the
book suggests they should, at least in Mozilla 1.6 and IE6. Removing

<BODY bgcolor="FFFFFF" text="000000" link = "0000FF" alink="FF0000"
vlink="800000>

and replacing it with <BODY>, on the other hand, displays the full
exercise as it's supposed to appear.

Where have I gone wrong?

Steve
 
Reply With Quote
 
 
 
 
Deryck
Guest
Posts: n/a
 
      07-02-2004

"Stephen Glynn" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
<BODY bgcolor="FFFFFF" text="000000" link = "0000FF" alink="FF0000"
vlink="800000>
>
>

Start by putting a " before the > in the above line. That certainly causes
IE a problem on my machine although not the one you describe.
Post the URL of the file too if you can please.

HTH
Deryck


 
Reply With Quote
 
 
 
 
Owen Jacobson
Guest
Posts: n/a
 
      07-02-2004
On Fri, 02 Jul 2004 19:31:13 +0100, Stephen Glynn wrote:

> This causes the first two paragraphs to vanish, though the last two --
> "Our Special Interests" and "Fun Places We've Been" -- display as the
> book suggests they should, at least in Mozilla 1.6 and IE6. Removing
>
> <BODY bgcolor="FFFFFF" text="000000" link = "0000FF" alink="FF0000"
> vlink="800000>

^^ you missed a double quote.

Also, numeric colour constants must begin with a hash (#).

> and replacing it with <BODY>, on the other hand, displays the full
> exercise as it's supposed to appear.
>
> Where have I gone wrong?


Don't use the deprecated body attributes to style the page. Use a
stylesheet.

--
Some say the Wired doesn't have political borders like the real world,
but there are far too many nonsense-spouting anarchists or idiots who
think that pranks are a revolution.

 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      07-02-2004
On Fri, 02 Jul 2004 19:31:13 +0100, Stephen Glynn
<(E-Mail Removed)> wrote:

> Can anyone advise me on this or suggest a group where I might seek help?
>
> I'm trying to work through an introductory exercise in QUE books' "Using
> HTML". This involves writing some text in notepad and then adding
> tags to produce a basic home page for some imaginary family.
>
> What they tell me to enter is
>
> (essentially ok code snipped)
>
> This causes the first two paragraphs to vanish, though the last two --
> "Our Special Interests" and "Fun Places We've Been" -- display as the
> book suggests they should, at least in Mozilla 1.6 and IE6. Removing
>
> <BODY bgcolor="FFFFFF" text="000000" link = "0000FF" alink="FF0000"
> vlink="800000>
>
> and replacing it with <BODY>, on the other hand, displays the full
> exercise as it's supposed to appear.
>
> Where have I gone wrong?
>
> Steve


Change your open body tag to:

<BODY bgcolor="#FFFFFF" text="#000000" link="#0000FF" alink="#FF0000"
vlink="#800000">

If this doesn't fix it, post a URL to a live example.

If that's not what the book tells you (as in, it wasn't your typo that
produced the erroneous body tag), throw it away. Far away. It's a litle
dated anyhow.

Actually, the modern way to do this would be more along the lines of:

<html>
<head>
<title>This is the title</title>
<style type="text/css">
body {
background-color: #ffffff;
color: #000000;
}
a:link {
color: #0000ff;
background-color: inherit;
}
a:visited {
color: #800000;
background-color: inherit;
}
a:active {
color: #ff0000;
background-color: inherit;
}
</style>
</head>
<body>
--- content ---
</body>
</html>

One more tip - use <p> to start a paragraph, and use </p> to end it. You
don't need to, it's not required, but it's a good habit to develop for the
possible future.
 
Reply With Quote
 
The Doormouse
Guest
Posts: n/a
 
      07-02-2004
Stephen Glynn <(E-Mail Removed)> wrote:

> <BODY bgcolor="FFFFFF" text="000000" link = "0000FF" alink="FF0000"
> vlink="800000>
>


Change this to <body> and remember that every tag has a start and an end.

For example:
<p>your text here</p> <-- it's important to close most tags this way

There is no need for the bgcolor, text, link and other items.
Those attributes (That's what they are called) are wasted space.

Later, you will use attributes - but not now.

The Doormouse

--
The Doormouse cannot be reached by e-mail without her permission.
 
Reply With Quote
 
Sid Ismail
Guest
Posts: n/a
 
      07-02-2004
On Fri, 02 Jul 2004 19:31:13 +0100, Stephen Glynn
<(E-Mail Removed)> wrote:

: <BODY bgcolor="FFFFFF" text="000000" link = "0000FF" alink="FF0000"
: vlink="800000>


Add the close quote, and the first 2 paragraphs reappear quite magically.
Even David Copperfield will be proud of you!

Sid

 
Reply With Quote
 
Mitja
Guest
Posts: n/a
 
      07-03-2004
The Doormouse <(E-Mail Removed)>
(news:Xns951A8A669E3Edoormouseattnet@68.12.19.6) wrote:
> Stephen Glynn <(E-Mail Removed)> wrote:
>
>> <BODY bgcolor="FFFFFF" text="000000" link = "0000FF" alink="FF0000"
>> vlink="800000>
>>

>
> Change this to <body> and remember that every tag has a start and an
> end.
>
> For example:
> <p>your text here</p> <-- it's important to close most tags this way


A bit unlucky choice...
Paragraph closing is optional in HTML.

> There is no need for the bgcolor, text, link and other items.
> Those attributes (That's what they are called) are wasted space.
>
> Later, you will use attributes - but not now.
>
> The Doormouse



 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      07-03-2004
On Sat, 3 Jul 2004 08:41:13 +0200, Mitja <(E-Mail Removed)> wrote:

> The Doormouse <(E-Mail Removed)>
> (news:Xns951A8A669E3Edoormouseattnet@68.12.19.6) wrote:
>> Stephen Glynn <(E-Mail Removed)> wrote:
>>
>>> <BODY bgcolor="FFFFFF" text="000000" link = "0000FF" alink="FF0000"
>>> vlink="800000>
>>>

>>
>> Change this to <body> and remember that every tag has a start and an
>> end.
>>
>> For example:
>> <p>your text here</p> <-- it's important to close most tags this way

>
> A bit unlucky choice...
> Paragraph closing is optional in HTML.


It's not required, but recommended.
 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      07-03-2004

"Neal" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> On Sat, 3 Jul 2004 08:41:13 +0200, Mitja <(E-Mail Removed)> wrote:
>
> > The Doormouse <(E-Mail Removed)>
> > (news:Xns951A8A669E3Edoormouseattnet@68.12.19.6) wrote:
> >> Stephen Glynn <(E-Mail Removed)> wrote:
> >>
> >>> <BODY bgcolor="FFFFFF" text="000000" link = "0000FF" alink="FF0000"
> >>> vlink="800000>
> >>>
> >>
> >> Change this to <body> and remember that every tag has a start and an
> >> end.
> >>
> >> For example:
> >> <p>your text here</p> <-- it's important to close most tags this way

> >
> > A bit unlucky choice...
> > Paragraph closing is optional in HTML.

>
> It's not required, but recommended.


The HTML 4.01 spec states that </p> is optional. Please point out where the
spec says it is recommended.

--
Cheers
Richard.


 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      07-03-2004
On Sat, 03 Jul 2004 13:48:58 GMT, rf <(E-Mail Removed)> wrote:

>
> "Neal" <(E-Mail Removed)> wrote in message
> news(E-Mail Removed)...
>> It's not required, but recommended.

>
> The HTML 4.01 spec states that </p> is optional. Please point out where
> the
> spec says it is recommended.
>


I didn't say the spec says it was recommended. I said it's recommended.

It's recommended by me.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New Releases: Mr. & Mrs. Smith, Complete Buffy & Enterprise: Updated complete R1 DVD DB & info lists Doug MacLean DVD Video 0 08-09-2005 05:07 AM
Re: Request: A+ Complete 3rd edition (PDF) [1/1] - A+ Complete 3rd edition.txt (1/1) Spammy Sammy A+ Certification 0 03-04-2005 12:55 PM
New Releases: Criterion additions, WB Gangsters & Coupling: Complete: Updated complete downloadable R1 DVD DB& info lists Doug MacLean DVD Video 4 11-07-2004 05:20 PM
Complete Newbie Question on XSL Transform Alan XML 1 07-11-2004 10:26 PM
Mr. Bean Complete Bean NOT complete!! Waterperson77 DVD Video 5 12-10-2003 05:22 PM



Advertisments