Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image inserted in a list

Status
Not open for further replies.

TomR100

Programmer
Aug 22, 2001
195
US
I am having a little trouble inserting an image into a list. It looks good but when I validate it I get an error.
Here is the code:
<ol>
<li>Member of the American Society of Home Inspectors®</li>
<li>Over 11 years of experience with more than 4,000 inspections completed</li>
<li>Computerized on-site reports</li>
<li>Two day results on your radon tests</li>
<img src= &quot;frea.gif&quot; alt = &quot;Foundation of Real Estate Appraisers logo&quot; width=&quot;150&quot; height=&quot;150&quot; align = &quot;right&quot; >
<li>Licensed Builder, Termite Inspector, and EPA Radon Certified</li>
<li>Affiliate member GRAR with electronic keybox key</li>
<li>Available for phone calls during and after business hours</li>
<li>Paul Young does all inspections personally</li>
<li>Visa, MasterCard, Checks and Cash accepted</li>
<li>Certified by the <a href = &quot; target=&quot;_blank&quot; >Foundation of Real Estate Appraisers</a> as a Commercial Real Estate Inspector</li>
</ol>

I get this error in the validator
Error: element &quot;IMG&quot; not allowed here; assuming missing &quot;LI&quot; start-tag

Can anyone help?
 
It depends what do you want to achieve.

You can insert an image as another list item:

<li>...
<li><img src= &quot;frea.gif&quot; alt = &quot;Foundation of Real Estate Appraisers logo&quot; width=&quot;150&quot; height=&quot;150&quot; align = &quot;right&quot;>
<li>...

or, if you want it to be with the same list item as Two day results on your radon tests text, just remove </li> tag before image.

or, if you don't want a list item marker appear next to it, you have to break your list into two different lists:

<ol>
<li>...
...
</ol>
<img src= &quot;frea.gif&quot; alt = &quot;Foundation of Real Estate Appraisers logo&quot; width=&quot;150&quot; height=&quot;150&quot; align = &quot;right&quot;>
<ol>
<li>...
...
</ol>

Keep in mind that in this case you'll loose the correct numbering of list items.


By the way, closing </li> tag is not required, you can omit it.

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top