If you want to get something like to cover whole of the text! You can use this:

&lt;div&gt;
 &lt;h3&gt;Afzaal Ahmad Zeeshan&lt;/h3&gt;
&lt;/div&gt;


And do this: 

div {
 background-color: #hexcode;
}


Secondly, if you want only the text to be wrapped, then you can try to remove the padding: or margin: Even if you don't have any, still write this:

h3 {
margin: 0;
padding: 0;
}


This way, all of the padding or margins will be removed and the background will be provided on just the text! 

This second one will fit perfect for your question: "make the background colour of a line of text fit to the edge of the text itself?"

Text background colour cuts to shape and length of text
Cityscape Web Enhancement lists an alternate class feature for Druids and Rangers, called Urban Companion:


  The character gains the companionship of a smaller but far more intelligent creature than she otherwise would have. This is identical to the sorcerer's ability to summon a familiar (PH 52), including all benefits granted and gained by the familiar, except as noted below. Her functional level for determining the abilities of the companion is equal to her druid level or one-half her ranger level.


Does a character with Urban Companion qualify for the Improved Familiar feat?
