Sunday, August 2, 2009

I need SERIOUS help on this HTML?

Okay something's not working right


I using this syntax here:-





1. %26lt;img src="text" alt="text"/%26gt;





2. I fill it in


%26lt;img src=c:\pic.bmp alt="My Dog"/%26gt;





and all I see is the image, I see not writing. I don't see my dog in the pic. Help!!!

I need SERIOUS help on this HTML?
Please put mouse curosor on the picture, then you see the "My dog" text.





The content of the alt attribute will siplay when you placed the mouse over on Image.
Reply:I think you would seperate them, for ex.


%26lt;img src="picture.jpg" alt="how are you"%26gt;%26lt;p%26gt;this is my dog





and...





make sure your dog picture is in the same folder as the html file is in.
Reply:you need to wrap quotes around the src attribute. like so:


%26lt;img src="C:\Pic.bmp" alt="My Dog" /%26gt;





Some other attributes worth mention for image tags: style="border: none 0px;" works to remove the border around images, especially if they are links.





Also, BMP is not supported on every system, I would convert my images to jpeg.





Plus, using a absolute path for images is not recommended. Put the image in the same folder as the html file, and refer to it like this: src="mydog.jpg" instead of src="c:\mydog.jpg"





Rick
Reply:remove the / at the end
Reply:If you want some text to appear when you hover the mouse over the image, you put the text in the title attribute, not the alt attribute. The alt attribute should contain text that would be helpful to people who would not be able to see the picture, e.g. a blind person using an audioor braille browser, or somone just using a text browser.





As for the rest, I agree with David D's answers to your question with the exception to point 5, i.e. switching to HTML from XHTML. There is an expert divide over which is better, and I don't find the points presented in the link provided very convincing and somewhat misleading, especially since the author of the site gets it wrong explaining well-formedness and validity. The examples he provides trying to prove that documents that aren't well formed can be validated, all do the opposite and prove him wrong!!!





There are other more convincing and accurate articles on the web about why use HTML over XHTML, they generally are to do with the content type i.e. how text/html and application/xhtml+xml are handled differently and how it can confuse some developers.





Equally, there are some new arguments about how XHTML-2 is not backwards compatible, and HTML-5 is. That's not really true because HTML-5 is also dropping some HTML 4.01 tags without a deprecation stage. Also, the same group is working on an XHTML-5. All major web browsers are backing the X/HTML-5 (they are actually leading the charge). So XHTML 1.0 is future proof just as much as html 4.01.





Apart from that David's answers to your question are spot on.
Reply:(1) 4) Alt text is an alternative, to be displayed INSTEAD of the image if the image can't be displayed, not as well as the image. "My Dog" probably doesn't qualify as a good alternative. http://htmlhelp.com/feature/art3.htm





(2) URLs with a \ character in them must be quoted. Add " characters.





(3) BMP files don't play nice on the web, convert to JPEG, GIF, or PNG





(4) File paths don't play nice on the web or across browsers, use relative URLs instead http://www.iusmentis.com/technology/www/...





(5) XHTML doesn't play nice on the web, switch to HTML and lose the "/" at the end. http://www.webdevout.net/articles/beware...
Reply:the writing will only show up when the image does not appear
Reply:Not making sense what your saying here.. you see your Picture? But not your Dog In the Picture?





From what i recall of my HTML days the alt don't that only work when the mouse is over the image?





Anyway here is a Quick Refrence Guide to help you through things...








http://www.htmlgoodies.com/beyond/refere...


No comments:

Post a Comment