К примеру есть
<span id='span'>1st</span><div class='div'><span id='span'>2nd</span></div>
alert($('#span').html())
скажет "1st"<div class='div'><span id='span'>2nd</span></div><span id='span'>1st</span>
alert($('#span').html())
скажет "2nd" но<span id='span'>1st</span><div class='div'><span id='span'>2nd</span></div>
alert($('.div #span').html())
скажет "2nd"