html - What is the meaning of a div container for a single element? -


i see things :

<div id='side_logo'>     <a class="logo" href="index.html">          <img src="img/logo.png">     </a> </div> 

what advantage use above markup instead of :

<a id='side_logo' class="logo" href="index.html">         <img src="img/logo.png"> </a> 

it allows better control on styling. example, if wanted logo in example sit inside colored box larger logo image, wanted logo clickable anchor.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -