Jump to content

HTML for Firefox


Sigord
 Share

Recommended Posts

As a pure novice of HTML I often use this excellent site to learn and test my efforts such as are created with simple programs of mine at http://sigord.co.uk/npage4.html.This below can be read prefectly using Internet Explorer, but a visitor to my site complains the images do not display, when he uses Firefox. What do I need to do to alter my Program that creates this code to ensure Firefox can display the images please.Gordon<html><head><title>Text & Images</title></head><body bgcolor=21D08E><font face=arial><font size=5><font color=000000><br><b><center>Page Test<font face=arial><font size=3><font color=000000><br>CLICK ON PHOTOS TO ENLARGE</center></b><b>This can be read prefectly using Internet Explorer, but a visitor to my site complains the images do not display, when he uses Firefox. What do I need to do to alter my Progam that creates this code to ensure Firefox can display the images please.<br><p>Gordon<br><b><center><font color=000000><br><b>coulrophobia<br><b><a href="Contribs\coulrophobia.jpg"/a><br><img border="0"src=Contribs\coulrophobia.jpg width=300height=Contribs\coulrophobia.jpg><p><br><b>ZBGR<br><b><a href="Contribs\ZBGR.jpg"/a><br><img border="0"src=Contribs\ZBGR.jpg width=300height=Contribs\ZBGR.jpg><p><br><b>ZPIC<br><b><a href="Contribs\ZPIC.gif"/a><br><img border="0"src=Contribs\ZPIC.gif width=300height=Contribs\ZPIC.gif><p></center></b></body></html>

Link to comment
Share on other sites

1. stop using deprecated tags like <font> and <center>.2. Stop using deprecated tag attributes like bgcolor.3. Use CSS instead.4. Put all attribute values in quotation marks, like src="Contribs\ZPIC.gif"5. Use the correct type of value for your attributes. height=Contribs\coulrophobia.jpg makes no sense.6. Put spaces between your attributes. width=300height=Contribs\ZBGR.jpg makes no sense. width="300" height="400" is better.7. Add a doctype to the top of your document to ensure compatibility.8. Validate your document to discover errors.

Edited by Deirdre's Dad
Link to comment
Share on other sites

Thanks. A validation shows Line 1, Column 1: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>" <html><head><title>Text & Images</title></head>Where is it expalined about the use of "<!DOCTYPE HTML SYSTEM>" Where can I find a fist of colours as <body style="background-color:PowderBlue;">instead of <body bgcolor=21D08E><font face=arial><font size=5><font color=000000>Can I buy a copy of your book on HTML somewhere other than Amazon preferably in the UK ?Thanks Gordon

Link to comment
Share on other sites

I give you a link to doctypes in my earlier post, item 7.Here is a list of colors. But don't get excited by the names themselves. Only the standard color names are consistently supported by browsers, and those colors are pretty boring. Most designers use hex numbers.

Link to comment
Share on other sites

Thanks again. I missed you kind link regardin DOCTYPES partly because of my dodgey eyesight.I will have to register with Amazon for the Book.Just a little reminder to others watching this thread, all web pages like HTML are asci files, which even BASIC programming can create a Sequential files.

Link to comment
Share on other sites

I much prefer to use numericals instead of descriptions for colors, as this is much easier to convert the RSGB values from charts in programming. How do I replace yellow and red below with numbers please. <body style="background-color:yellow;"><p style="font-family:arial;color:red;font-size:20px;">A paragraph.</p>Thanks Gordon

Link to comment
Share on other sites

change your code to solve your problem.use the following code and the browser will display ur images properly.<html><img border="0"src="http://www.programmingbulls.com/images/logo.jpg"height="30" width="50"/ alt="logo.jpg"></html>You have not Used Height and Width attribute properly.there is a lot to <img> tag then u know.Check out the site to use <img> tag properly.Image tag In HTMLthis will help you learn how to use images in a webpage.

Edited by vipul_vj
Link to comment
Share on other sites

Thanks.Actually I am now using <img src="Penny2\petunias-(14).jpg" width="500 "/><p> which my friend says works OK with Firefox now I have added the recommended DOCTYPE.I omit the height to allow anyone using my program to select the width, so that the browser with determine the height in preportionGordon

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...