Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 11th, 2003, 12:01 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default Another HTML Code Problem

Hi all,

I am having a problem with another piece of HTML code. I'm actually working with two HTML files. One is supposed to be the frames document and the other file is the main web page.


Here's the code for the frames document:


<HTML>

<HEAD
<TITLE>Nomad Ltd Online</TITLE>
</HEAD>

<FRAMESET COLS="235,*" FRAMEBORDER="1">
  <FRAME SRC="navbar.htm" NAME="nav">
  <FRAME SRC="main.htm" NAME="main">
</FRAMESET>

<NOFRAMES>
This page was designed to be viewed with frames. You can open individual pages using the <A HREF="navbar.htm">navigation bar</A>
</NOFRAMES>

</HTML>



The main document code looks like this:


<HTML>

<HEAD>
<TITLE>Nomad Ltd online</TITLE>
</HEAD>

<BODY>

<IMG SRC="images/welcome.jpg" ALT="Welcome to Nomad Ltd online" WIDTH="540" HEIGHT="100">

<TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0" BGCOLOR="#B0E0E6" WIDTH="541">
  <TR>
    <TD COLSPAN="2"><A HREF="construction.htm"><IMG SRC="images/gradient.jpg" WIDTH="540" HEIGHT="70" BORDER="0" ALT="Schedule your vaccine against cabin fever - Nomad winter tours!"></A>
  </TR>

  <TR BGCOLOR="#B0E0E6">
    <TD ALIGN="right" WIDTH="300"><A HREF="construction.htm"><IMG SRC="images/athlete.gif" WIDTH="203" HEIGHT="116" ALT="Athlete" BORDER="0"></A>
    <TD ROWSPAN="2" ALIGN="left" VALIGN="center"><A HREF="construction"><IMG SRC="images/leisure.gif" WIDTH="197" HEIGHT="124" ALT="Leisure" BORDER="0"></A>
  </TR>

  <TR BGCOLOR="#B0E0E6">
    <TD HEIGHT="145" ALIGN="center"><A HREF="construction.htm"><IMG SRC="images/arts.gif" WIDTH="202" HEIGHT="121" ALT="Arts" BORDER="0"></A>
  </TR>

</TABLE>

<BR>

<A HREF="construction.htm"><IMG SRC="images/skibar.jpg" WIDTH="500" HEIGHT="63" BORDER="0" ALT="Ski off into the sunset - Fall into Winter sale, October 3-8"></A>

</BODY>

</HTML>


I got the frames document coded like the Beginning HTML book said to code it as and I thought I was doing ok. Turns out that I'm not. I cannot get anything beside the words "Nomad Ltd Online" to appear inside the document. Am I doing something wrong? Would anyone suggest combining the two HTML pages into one document?

HELP ME!!!


Ben
Madison Area Technical College student
__________________
Ben Horne
-------------------------
I don\'t want to sound like I haven\'t made any mistakes. I\'m confident I have.

Most likely using FireFox and concocting my next Macromedia Flash project
Snibworks Forums Moderator

Welcome to the New Age
 
Old October 11th, 2003, 12:11 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Ben,

Did you consider getting a HTML checker? There are a few (free) ones available, for example there is an on-line version available at: http://www.w3.org/ ALso, Dreamweaver 2004 has a built-in HTML checker.

I think they would have been able to spot your mistake:

<HTML>

<HEAD>
<TITLE>Nomad Ltd Online</TITLE>
</HEAD>

You are missing the closing > of the <head> tag.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old October 13th, 2003, 03:35 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default

Hi Imar,

I did have time to check out the HTML checker at the http://www.w3.org/ But, that checker is only for XHTML (as I see it right now). I may have missed something in my preliminary check of the website but I believe it's designed to check only XHTML documents.

Regarding my problem, I started the whole frames document over again and it came out fine the second time through. Everything looked ok when I ran into the problem but on the second try, I did notice that I was missing a closing > on the <HEAD> tag.

Anyways, thanks for the tip

Quote:
quote:Originally posted by Imar
 Hi Ben,

Did you consider getting a HTML checker? There are a few (free) ones available, for example there is an on-line version available at: http://www.w3.org/ ALso, Dreamweaver 2004 has a built-in HTML checker.

I think they would have been able to spot your mistake:

<HTML>

<HEAD>
<TITLE>Nomad Ltd Online</TITLE>
</HEAD>

You are missing the closing > of the <head> tag.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Ben
Madison Area Technical College student
 
Old October 13th, 2003, 03:55 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

The W3C checker is designed to handle strict HTML 4.01/XHTML or dynamically update to settings based on the inclusion of the doctype setting. To set the validator to a specific version of HTML use the advanced settings link available from the validator homepage, or just click this link.

http://validator.w3.org/detailed.html

Personally I would strongly encourage you to design your mark-up to be fully XHTML compliant. This is where mark-up is going! You've used quite a few deprecated tags and aren't even HTML 4.01 compliant.

I wrote an FAQ a little while back which explains how to begin the focus toward standards compliant code. Granted my FAQ is written from the standpoint of a PHP developer, but the mark-up used is universally applied. I haven't even began to touch the surface on every deprecated element and possible CSS translation. But its a good start.

http://p2p.wrox.com/topic.asp?TOPIC_ID=4028

: )
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::





Similar Threads
Thread Thread Starter Forum Replies Last Post
a block of html code keyvanjan ASP.NET 1.0 and 1.1 Basics 2 July 14th, 2006 12:48 AM
HTML Code in XML Neelimaa XML 2 May 4th, 2006 07:31 AM
What is wrong in my HTML-code.....?????? Burton HTML Code Clinic 11 October 13th, 2004 08:16 AM
HTML Code Problem Ben Horne HTML Code Clinic 5 October 9th, 2003 10:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.