Website scripts keep running in one of two places – the client side, also called the front-end, or the server side, additionally called the back-end. The client of a website refers to the web browser that is seeing it. The server of a website is, of course, obviously, the server that hosts it.
Most web coding languages are designed to keep running on either the server side or the client side. This largely defines how they work. Here are a few examples.
Client Side Languages
document.getElementById('hello').innerHTML = 'Hello';
Server Side Languages
Before loading HTML, server side or back-end language runs its script, not after that. There are a scope of server side languages in use on the web today. PHP is one of the most famous, just as Ruby on Rails, ASP.NET and numerous others. They are called server-side languages because their scripts run on your computer, rather than on the server that hosts the website and sends the HTML code.
Consider this PHP code:
<h1 id="hello"><?php echo 'Hello'; ?></h1>
On the other hand, the PHP code run by the server will not be seen anywhere. This is because the server has already taken care of PHP, and what is sent to your computer is the resulting pure HTML.
Most sites make use of both a server side and client side language. Although there are things both can do, there are a few things which must be done server side, and there are a few things which must be done client side.
Front-end scripting is useful for anything that requires user interaction, such as a simple game. Back-end scripting is good for anything that requires dynamic data to be loaded, such as a notice that tells the client they're signed in.
To write your own front-end and back-end scripts, you should learn web development and PHP training in Chandigarh.