For some web-designer, correct HTML tag in every html file is a must. The HTML tag in every web page should follow the W3C, so it can be mentioned as a valid HTML page. But sometimes, although some image can be seen as good as we want, actually we (and other web-designer) did a very fatal mistake according to W3C standard. How come?
Image can be shown in every web page with a very simple HTML tag. For example, we want to display an image “example.jpg” from our hosting directory “www.compexplorer.com/images”. The HTML tag to show the image correctly is :
<img src=”http://www.compexplorer.com/images/example.jpg”>
With the HTML tag above, there’s no problem in any browser at all. The picture can be display correctly. But, unfortunately, it’s a wrong HTML tag according to W3C standard. How come?
W3C standarize the HTML tag for image with a minimum 2 attribute, consist of :
- src : determine the target image to be displayed.
- alt : determine the alternative text when the picture is not (yet) appear. If we do not want to display alternative text, we still have to inser this attribut with a blank (no text) inside.
Is it finish? Not yet. W3C also standarize a form for every HTML tag that do not have a closing tag, including image tag. It must be endded with a slash “/” before closed by a general closing tag “>”.
Then, we can make a correct HTML tag for image like this :
- Without alternative text : <img src=”http://www.compexplorer.com/images/example.jpg” alt=”" />
- With alternative text : <img src=”http://www.compexplorer.com/images/example.jpg” alt=”this is an example” />
Why should we follow the W3C guidance? Well, you can find the answer here. Enjoy!
Related posts:
- SEO for Image, Tips for your images
- Tips for Faster Image Loading
- Importance Of Correct And Valid Html
- How To Create An HTML Newsletter
- Find Duplicate Image Using Image Comparer
- HTML is the programming language that has been instrumental in bringing about this revolution called ‘Internet’
- Hide Your Affiliate Link
- Create a Favicon In Your Website
- An Ideal Solution to Upload Your PSD Files
- SEO Tips
[...] image on a web has become a current needs for almost every websites. Images is often use as a banner, [...]
Tips for Faster Image Loading | Comp. Explorer — December 28th, 2008 at 2:56 pm[...] ended slash can really helps in SEO for image. But, this tag and ended slash is a must for every image in our site to make sure that our site is a valid W3C site. Since we know that having a valid W3C [...]
SEO for Image, Tips for your images | Comp. Explorer — January 31st, 2009 at 2:23 pmInteresting blog you got here but I can’t seem to find the RSS button.
Eden Hibbard — March 18th, 2010 at 10:06 amWe entered to a software as Bayilik Franchise Software. This infos gave help us for improve our program. We will send our software for your review.
bayilik — September 5th, 2010 at 8:22 pmRemarkable details for upload files for getting myself personally get going. Most definitely i’ll keep this specific website link and revisit it.
upload html codes — November 1st, 2010 at 1:36 pmCompassionate for the brobdingnagian criticism, but I’m truly admiring the new Zune, and expectation this, as shaft as the reviews fill have written, instrument refrain you decide if it’s the modify choice for you.
robot electromenager — December 3rd, 2010 at 12:30 pmOne thing I would really like to comment on is that fat reduction plan fast can be carried out by the appropriate diet and exercise. People’s size not just affects appearance, but also the overall quality of life. Self-esteem, depression, health risks, plus physical abilities are disturbed in excess weight. It is possible to just make everything right and still gain. If this happens, a condition may be the root cause. While too much food but not enough body exercise are usually at fault, common health conditions and widespread prescriptions might greatly amplify size. Thanks alot : ) for your post here gywl512.
Klara Tougas — May 13th, 2011 at 7:30 am