why animate ?

why animate ?

  1. $('a').click(function(){
  2.     $('html, body').animate({
  3.         scrollTop: $( $(this).attr('href') ).offset().top
  4.     }, 1000);
  5.     return false;
  6. });

The script above works perfectly fine , but i have a question about the animate function() , 
why is it that we are selecting $('html,body') ?? i don't get it . 

what i understand is that if i write the code as 
  1. $('a').click(function(){

  2.         scrollTop: $( $(this).attr('href') ).offset().top,
  3.          1000;
  4.     return false;
  5. });
it will work just fine , Alas without any effect ! 

i understand that animate is being used to to add an effect , but just to repeat my question , why is 'html' and 'body ' being selected ?????