Search code examples
imagew3cw3c-validationalignment

How to fix IMG align="left" to be W3C valid?


How to fix <img align="left" problem to be W3C valid?


Solution

  • Try using float to position the element to the right/left. It also pays to learn the other css positioning methods (eg, absolute, relative, and float).

    Example:

    <img style="float: left">
    

    Docs: http://www.w3schools.com/css/pr_class_float.asp

    CSS Positioning Tutorial: http://www.barelyfitz.com/screencast/html-training/css/positioning/