WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Error with image

[Resolved] Error with image

  • Can someone tell me what is wrong with the following:

    <p class=”MsoNormal”><span style="font-size: 10pt"><img src="http://www.johnmorgan.ca/images/JMHype%20revised.jpg" /></span></p>

    I can’t figure it out, but apparently there is an error with it.

    Thanks

Viewing 15 replies - 1 through 15 (of 15 total)
  • Justin Tadlock
    WordPress God

    @greenshady

    No alt text in your image:

    <img src="example.jpg" alt="Alt text should go here" />

    I’d also close this with a semi-colon (for good measure):

    style="font-size: 10pt;"

    What I don’t understand is why you have a <span> around your <img>. It doesn’t seem to do much the way it’s used.

    what is alt text? sorry if that is a dumb question but I do not know much about this.

    Oh wait… I think I figured it out.

    Could you help me out with another error? This is my last one to validate my site:

    <input type=”image” src=”https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif” border=”0″ name=”submit” alt=”PayPal – The safer, easier way to pay online!”></input>

    This is from my PayPal on my website. It says there’s something wrong with border =”0″

    It says there’s something wrong with border =”0″

    Its says that? What exactly does it say, because I assure you thats NOT what it says.

    The answer lies in what it says.

    This is what it says:

    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the “Strict” document type with a document that uses frames (e.g. you must use the “Transitional” document type to get the “target” attribute), or by using vendor proprietary extensions such as “marginheight” (this is usually fixed by using CSS to achieve the desired effect instead).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

    like I said, the answer is in the message:

    check that they are both allowed in the chosen document type

    border="0" is NOT valid XHTML.

    Hrm..ok..but that is what PayPal told me to copy and paste…I had to copy and paste all of the code from paypal in order to allow people to donate from my website. What would you suggest I do?

    I suggest you do the obvious and remove that border="0"

    Then I suggest doing a little more reading, and a little less monetizing.

    <p class="MsoNormal">

    youre also copying out of MS Word — if you intend on having a decent looking web site, youre going to want to stop doing that.

    Thanks…
    But I do not appreciated being talked to like that…and I do not appreciate how rude you just were.
    I’ve been reading, trust me, and I’m having a bit of a hard time with all of this. If helping me is so out of your way then don’t do it.

    I dont really care what you appreciate or dont, nor am I concerned with how rude you think I might have been.

    Trust me.

    You are just one more new wordpress user who wants to run before they walk, and doesnt stop to learn the basics. Dime a dozen around here.

    I’ve been working on this website for about 3 months now..I’ve read a lot, and I’ve been trying to do things using my own knowledge (I have a little bit of knowledge about CSS). Sometimes I need a little bit of help, like everyone else on here, so sorry if it is so inconvenient. Maybe you shouldn’t judge people and stop assuming we’re all the same.

    Maybe you shouldnt keep responding? You got your answer, right?

    You’ve demonstrated 3 basic mistakes in this thread.

    1. Youre pasting out of MS Word.

    2. You clearly demonstrate a lack of understanding of XHTML >>

    3. << Youre not comprehending the error messages. Be it known that comprehending error messages implies that you read them.

    Whether or not you have been working on this site for 3 months or 3 years is of little consequence.

    Lastly, Youve tried, for some reason, to add words into what I have typed. Instead of arguing, for no apparent reason, take my advice, and let it go.

    Advice taken =)
    have a good day!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Resolved] Error with image’ is closed to new replies.