Click to See Complete Forum and Search --> : check my site


bkelly
07-07-2005, 08:11 PM
I ran the site validator ( http://validator.w3.org/ ) and entered what I hope is my entry page
www.bkelly.ws/index.htm

The validator says that there is no character encoding found. The first line of that file is
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

Obviously there is something here I don't understand. The site is not anywhere near complete, but until I can get some fundamentals working, there is no point is add a lot of details.

What do I have wrong here?
I can get to the site using just www.bkelly.ws


Bryan

invertedpanda
07-07-2005, 08:36 PM
You have a doctype, but you also need a character encoding.

http://www.w3.org/TR/REC-html40/charset.html - not the most readable, but provides a good explanation of character encoding and what it is.

bkelly
07-08-2005, 04:53 PM
I am having difficulties here. I have followed several links via the validator utility and do not recognize any statement that says put this text <something> at this place <somewhere> in your web page file.

Here is the header of my index.htm file with three of the lines I have added and moved around to no avail. What will these first few line look like when properly done to provide the doctype and character encoding.

<HTML>
<HEAD>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
Content-Type: text/html; charset=iso-8859-1
<TITLE>B Kelly's home page</TITLE>
</HEAD>
<BODY BGCOLOR = "#FFFFFF" >

invertedpanda
07-08-2005, 05:00 PM
First: Doctype should be declared before HTML and head. Here is an example:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Title Here</title>


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

Blah.

</body>

</html>


Also, you are using an older doctype.. Honestly, I've never seen anybody actually use an older doctype :) I code all my sites in HTML 4.01 Strict - a lot of people also do HTML 4.01 transitional, which is ok by most peoples' standards (not mine :)). Then, of course, there are XHTML doctypes and whatnot, but you don't really need that yet.

bkelly
07-08-2005, 09:09 PM
I have the book "Web Design in a Nutshell," an O'Reilly book that discusses HTML 4.0. This book describes Background and has the attribute "background-color." When I run the validator, it says there is no such attribute as "background-color" The validator also complains about "align", "color", "font" and just about every attribute I use. Did all these attributes get dropped between 4.0 and 4.01?

I opened the site www.the-engine.org and looked at the source code. I cannot recognize the attributes that set background color or aligns text to be in the center or right side. How are these attributes set?

Thanks for your time,
Bryan

JDM71488
07-08-2005, 09:37 PM
a little something about markup: don't use &nbsp;, its ugly and css can do the exact same thing with padding, or margin... judging by my instinct id say your RATHER new to web design so as a suggestion read on web standards and correct markup so you can get off on the right start. :)

example, for markup, your links should be marked up as such: a <ul> or <ol>, or even a <dl> if that is what it calls for, but for most navigation a <ul> with child <li>s work wonders...

apply a little css to correct/better (x)html markup and you can have a wonderfully accessible site for all browsers, os, and people... :)

dera
07-08-2005, 10:17 PM
I have the book "Web Design in a Nutshell," an O'Reilly book that discusses HTML 4.0. This book describes Background and has the attribute "background-color." When I run the validator, it says there is no such attribute as "background-color" The validator also complains about "align", "color", "font" and just about every attribute I use. Did all these attributes get dropped between 4.0 and 4.01?

I opened the site www.the-engine.org and looked at the source code. I cannot recognize the attributes that set background color or aligns text to be in the center or right side. How are these attributes set?

Thanks for your time,
Bryan
it will say there is not attribute because ur validating it according to 3.2 html how can you have html 4 ele,ments in an older doc type?

invertedpanda
07-08-2005, 10:33 PM
a little something about markup: don't use &nbsp;, its ugly and css can do the exact same thing with padding, or margin... judging by my instinct id say your RATHER new to web design so as a suggestion read on web standards and correct markup so you can get off on the right start. :)

example, for markup, your links should be marked up as such: a <ul> or <ol>, or even a <dl> if that is what it calls for, but for most navigation a <ul> with child <li>s work wonders...

apply a little css to correct/better (x)html markup and you can have a wonderfully accessible site for all browsers, os, and people... :)


I disagree on the &nbsp; statement - Code wise it can be a heck of a lot more efficient to use &nbsp; rather than specifying padding and margins in a css file, as long as your usage is minimal. I haven't heard or read any argument that &nbsp; is actually detrimental to accessability, useability, or general browsing yet, so that's why my position is the way it is. If you have any info on why &nbsp; is bad, I'd like to read it.

dera
07-08-2005, 10:43 PM
I disagree on the &nbsp; statement - Code wise it can be a heck of a lot more efficient to use &nbsp; rather than specifying padding and margins in a css file, as long as your usage is minimal. I haven't heard or read any argument that &nbsp; is actually detrimental to accessability, useability, or general browsing yet, so that's why my position is the way it is. If you have any info on why &nbsp; is bad, I'd like to read it.
&nbsp; uses text to make a space it isn't neccesary and is bad because fonts are always diffrent sizes, if you had variable font and increased the window or changed computers etc... the site will go out of wack. thats why its bad.

JDM71488
07-08-2005, 10:47 PM
well, i didn't mean it was bad, but there are cleaner ways to move the text than to manually indent using &nbsp;

case 1: p { text-indent: 1cm; } one time...
case 2: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.... every paragraph (or wherever you use it)

&nbsp; imho takes away from the source of your document, which is information... imho it doesn't belong there and thats why i don't use it...

its not said to be BAD, but dera gets a pat on the back from me...

invertedpanda
07-08-2005, 10:54 PM
well, i didn't mean it was bad, but there are cleaner ways to move the text than to manually indent using &nbsp;

case 1: p { text-indent: 1cm; } one time...
case 2: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.... every paragraph (or wherever you use it)

&nbsp; imho takes away from the source of your document, which is information... imho it doesn't belong there and thats why i don't use it...

its not said to be BAD, but dera gets a pat on the back from me...

Aah. I don't usually use it more than twice in a row. Besides, sometimes it is just plain unwieldy :)

bkelly
07-09-2005, 06:46 AM
As JDM71488 noted, I have very little experience in web design, and really have no desire to become a top level web writer. I do have some things I want in my site and want to keep it simple and easily navigable.

From some of the posts here I changed the first few lines of my site as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<TITLE>B Kelly's home page</TITLE>
</head>
<body background-color = "#FFFFFF" >

When I run the validator, it says that the encoding is iso-8859-1 and that the doctype is HTML 4.01. It then proceeds to tell me that are no background attributes such as align, color, font, etc.

For reference, the referenced page is www.bkelly.ws/index.htm

Thanks for your time,
Bryan

the tree
07-09-2005, 08:32 AM
When I run the validator, it says that the encoding is iso-8859-1 and that the doctype is HTML 4.01. It then proceeds to tell me that are no background attributes such as align, color, font, etc.That's because those attributes are are depreciated wich basically means out of date.
Try this example:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<title>B Kelly's home page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body{
background-color: #fff;
color: #000;
}
h1{
text-align: center;
font: bold italic 3em sans;
color: #f00;
border-bottom: 10px solid #999;
}
ul#pursuit{
list-style-type: none;
}
ul#pursuit li{
display: inline;
padding: 20px;
}
//-->
</style>
</head>
<body>

<h1>This is the home page for B Kelly </h1>

<p>This is my home page site. Here are some things that I would like to pursue.</p>

<ul id="pursuit">
<li><a href="pride/">The PRIDE party</a></li>
<li><a href="common/">Common Bill Format</a></li>
<li><a href="spam/">SPAM BAM</a></li>
<li><a href="bk/">Pictures</a></li>
</ul>

</body>
</html>Note how using CSS for presentation and HTML for structure makes everything a lot neater and simple.

bkelly
07-09-2005, 10:21 AM
Hello Tree,

I copied your example into my site and it looks just fine. Now I will search out a good book/story/definition of 4.01 and this "css" coding.

Thanks for your time,
Bryan

the tree
07-09-2005, 10:24 AM
Probably best to start at the source, see the the w3 (http://w3.org)'s site.

dera
07-13-2005, 05:32 AM
search tutorials on hotscripts under html