Click to See Complete Forum and Search --> : HTML Basic


zapet
07-03-2003, 05:50 AM
I have just started out with HTML and I am following a manual.Having typed the following into wordpad

<HTML>
<HEAD>LearningHTMLHomepage</TITLE>
<TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>

and trying to place some text/content between the 2 body tags, nothing shows.

I think the problem is that I`m using iE6 which was downloaded from microsoft website, when I save the file as a text file ( index.htm) open up iE6 and browse for the file the htm element of the naming of the file sometimes disappears, when I take it from the browser into ie6 the wordpad just appears as above ( it all written in notepad with tags and all)

Could somebody please point out what I am doing wrong?

Thanks

Hester
07-03-2003, 05:53 AM
Make sure you save it with the right extension (.htm). Sometimes Notepad likes to save it with ".txt" on the end. Otherwise, can't see anything wrong with the code!

Login_Here
07-03-2003, 06:07 AM
I have some ideas. First is that you forgot to write
<font>
For example if you want to use arial u write
<font face="arial">
And then u might want to have size 5 you write
<font face="arial" size="5">

And another tip is to use word to get a html document.
For example:
Start Word press File>Save as
Then write index as a filename and choose the filtype html.

Charles
07-03-2003, 06:14 AM
In HTML the start and end tags for the HTML, HEAD and BODY elements are optional, but specifying the document type definition, the character encoding and the title are required. And note, there is no FONT element anymore. It was done away with back in 1997.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Some Title</title>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>

And you would do very well to make friends with the validator ar http://validator.w3.org/. MSIE and some other browsers are very forgiving of HTML errors. If you are not careful you will learn a whole bunch of bad habits and then wonder why your page only works on one browser.

Hester
07-03-2003, 06:19 AM
Even without the font tag, the page should still display as it will use the native font set in the browser.

robot88888888
07-03-2003, 08:26 AM
You started your title after the open head tag. It needs to start after the open title tag.

<HTML>
<HEAD>
<TITLE>LearningHTMLHomepage</TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>

Just a side note:
You might want to get used to typing your tags using lower case. If the web world switches to XHTML instead of HTML, you'll thank yourself later. For more info on XHTML, check out http://www.w3.org/TR/xhtml1/.

Robert Wellock
07-03-2003, 10:39 AM
If you wanted to use XHTML it would look similar to the following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Learning HTML Homepage</title>
</head>
<body>
<p>Hello World</p>
</body>
</html>

robot88888888
07-03-2003, 11:12 AM
Robert,

Have you heard anything about the XML declaration causing any problems? I've been told not to use the declaration, for now, since some older browsers get confused by it.

<?xml version="1.0" encoding="UTF-8"?>

Robert Wellock
07-03-2003, 12:16 PM
M$ IE 6.0 is so bug ridden that it enters quirks mode if it is present which is what you'd get with IE 5.5 or below anyway. Netscape 4.7x has no major issues nor does Opera 5.0x

For XHTML:

… Such a declaration is required when the character encoding of the document is other than the default UTF-8 or UTF-16 and no encoding was determined by a higher-level protocol. …

abectech
07-03-2003, 12:55 PM
i think robot88888888 had it right. Your title would include the other tags because the second title wasnt ended. If youuse the text he put int it will appear correct. IF youhave any other questions emaill me at ryan@abectech.com

Aronya1
07-03-2003, 11:11 PM
Originally posted by zapet
I have just started out with HTML and I am following a manual.Having typed the following into wordpad
Hi zapet,
First suggestion: use Notepad instead of Wordpad.



<HTML>
<HEAD>LearningHTMLHomepage</TITLE>
<TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>

If this code is accurate the way you presented it here, what your browser should be displaying is this:
LearningHTMLHomepage
The reason is that you didn't properly open your <title> tag. You closed it first, then opened it. Everything after that open <title> tag is supposed to be hidden. Correct your use of that tag, and you'll see what you are putting between the two <body> tags.



I think the problem is that I`m using iE6 which was downloaded from microsoft website, when I save the file as a text file ( index.htm) open up iE6 and browse for the file the htm element of the naming of the file sometimes disappears, when I take it from the browser into ie6 the wordpad just appears as above ( it all written in notepad with tags and all)

Could somebody please point out what I am doing wrong?

Thanks What you described here will leave you with a file name of WHATEVERFILE.HTM.TXT. That is a text file, not a html file, and your browser is displaying exactly what it should: the exact contents of a text file. When saving your file, be sure to choose 'All Files' in the 'Save as type' field, and remember to include the .htm extension on your file name.

Hope this helps, and be sure to let us know how things go.
Aronya1

Hester
07-04-2003, 03:55 AM
Originally posted by robot88888888 Just a side note:
You might want to get used to typing your tags using lower case. If the web world switches to XHTML instead of HTML, you'll thank yourself later.

XHTML and XML can be written in either lower or upper case. So long as the format remains the same throughout the document.

Charles
07-04-2003, 05:12 AM
Originally posted by Hester
XHTML and XML can be written in either lower or upper case. So long as the format remains the same throughout the document. I'm afraid that that's wrong. XML is case sensitive; elements must match the case as they were declaired in the DTD. In the XHTML DTDs elements and attributes are all lower case.