I need to know if i can apply passwords on my personal websites so that only i or those whom i want can view my site.
Short answer: Yes, you can! (~;
Long answer: Yes, you can and how to do it depends on your system components and precise requirements. For instance, if you use Apache httpd server, you can control access through .htaccess and .htpasswd files.
It honestly depends upon where your website is hosted.
If you're on some free hosts you may have some restrictions imposed as to how secure you can make elements of your site.
If you've paid for your own hosting however you should be able to-do it either via your hosts control panel, through htaccess or via a script.
thanks all for the information and tips