Personally, I suggest you to use some respnsive css/js frameworks like Twitter/Bootstrap or YAML. Download files, look at examples and play with them a bit. It's quite easy to learn the foundamentals and go on with your projects. Both these frameworks ensure a perfect responsive web site.
Responsive web design is the practice of building a website suitable to work on every device and every screen size, no matter how large or small, mobile or desktop. Responsive web design is focused around providing an intuitive and gratifying experience for everyone. Desktop computer and cell phone users alike all benefit from responsive websites.
now html5 and css3 will be entirely different in tablet and mobile devices (not usually in desktop)
one line same code just add some extra line to tablet , mobile,etc etc