Problem in HTML

Status
Not open for further replies.

slugger

Banned
I faced this problem the other day when I was learning HTML programming (also ensuring that the code was compatible with XHTML 1.0).
I wanted to to use a picture as a background, change the color of the fonts in the whole page and in a seperate page change the colour of the background of the page.
So the code that I used was like this

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"*www.w3.org/TR/xhtml1/DTD/transitional.dtd">
<html>
<head><title>itgiot</title></head>
<body background="img08.gif" bgcolor="#ff9933" text="#934ce8"></body>


othijh jhjhgfkljgfbf <font color="#00FF00">mdhlpkzpg</font></p>
</html>

These tags and attributes were in accordance with what had been mentioned in the tutorial.
The file name of the image was correct and the appropriate hexadecimal number was used to change the font and background color.
Inspite of this, I was unable to obtain any effects associated with the use of the attributes.

To see if I had diasabled the use of site specified font color, from the tool bar in Internet Explorer I went to

Tools>Internet Options>Colors
[URL=*imageshack.us][img]*img281.imageshack.us/img281/2589/openwith4uh.jpg[/URL][/img]

There the 'Use Windows Colors' option had been enabeled.
So I disabled it to see what happens, but still I didnot get the desired result.
Also the the same problem arises when I try to change the color of the font of a particular portion the page using the 'color' attribute for the "font" tag.
Also I have taken care to close each tag
I am able to insert normal images in the page using the 'src' attribute to the "img" tag.
I preveiw the pages using IE 5.00.3502.1000
When I tried to open the page that I created on a different computer, the page turned out normally as I had expected.
Debugging doesnot turn up any errors.
I'm using AceHTML editor.
Can anybody please help me with this.
 

siriusb

Cyborg Agent
Except for the placement of "<//body>", there is nothing wrong with the document. What is wrong in ur browser? A screenshot?
 

alib_i

Cyborg Agent
It works fine on my IE and Firefox.
But I too feel that probably that misplaced "</BODY>" tag is causing the problem for you.
It should be at the end of the body, i.e. just before the </HTML> tag.
Just correct it and see if it renders the right way.

-----
alibi
 

Deep

Version 2.0
hmm

Actually background property should work in XHTML 1.0 (its ruled out from XHTML 1.1)

anyways you can try out following code:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"*www.w3.org/TR/xhtml1/DTD/transitional.dtd"> 
<html> 
<head><title>itgiot</title>
<style>
body{ 
	font-family:Verdana, Arial, Helvetica, sans-serif;
	font-size:11px;
         color:#934ce8;
	background-color:#ff9933;
	background-image:url(img08.gif);
	background-repeat:repeat;
}
</style>

</head> 
<body>


othijh jhjhgfkljgfbf <font color="#00FF00">mdhlpkzpg</font></p> 
</body> 
</html>

make sure that css file and image file both are in same folder. (or if they are in diff. then change the path according to that...)

Regards,
Deep
 
OP
slugger

slugger

Banned
problem found

thanx 4 helping me out. the prob actually lay in the accesibility tab where I had enabled the
Ignore colors specified on Web Pages
option.
*img497.imageshack.us/img497/5238/soln2gn.jpg
As a result I was facing all the problems, that i was facing.
as 4 the misplaced </body> tag, i typed it in a hurry in a cafe on notepad.
thanx a ton once again.


ps: - I apologise 4 posting the wrong scrrenshot in my problem post. I had actualy intended to post this screenshot.
*img217.imageshack.us/img217/3038/first5sn.jpg
 
Status
Not open for further replies.
Top Bottom