Doubt if practising ping on any website is illegal

I am confused if i practise ping and nmap on any website as you showed for hdfc bank website
is illegal ?

Its Completely fine to practice ping on any website , but practicing nmap may lead to violate some rules of an organization.