Web Info and IT Lessons Blog...

Monday, 18 August 2014

Basic information of web languages

The main languages used on web to create a website are Html which is the core language of the web, Cascading Style Sheets (Css) which is a style sheet language, javascript a client side scripting language and php (Hypertext Preprocessor) a server side scripting language.



HTML:
HTML is abbrevation of Hypertext Markup Language and it is the building block of web. Html consists of tags used to build the blocks of html page. The html tags are in pairs i.e an opening tag which starts the html element followed by a closing tag which ends the element. The most basic tag is the html tag which starts the html content and the closing html tag ends the html content.i.e

<html></html>

Css:
Css is used along with html to give style to the block elements created in html. Basically it is used to add beauty and color to the empty and colorless html elements. Apart from colors there are many more properties of css like setting the width and height of the html elements and setting the positions of the html elements in the webpage etc. In css selectors are used to select the html element and then the style is applied to the selected element as we define.

Javascript:
Javascript is the client side scripting language. Client side language means that it runs in the web browser and has direct interaction with the user. Scripting language is a language which does not need to be compiled like non-scripting languages. Non-scripting languages include C, C++, Java etc. Javascript is also a light weight language which means that it is not structured with complexity. Javascript works on events, whenever an event is triggered there is a function call on the event and a specific task is performed by the script. Like forexample if we want to alert hi every three seconds we will set a timing event in javascript and after each 3 seconds an event will be triggered and we will be alerted with a hi message.

PHP:
PHP is a server side scripting language and is a source of communication between client and server. So why do we need server side language? Let us say a user visits our site and we want to display his information which will be obviously stored in the database, now javascript is client side language it cannot fetch data from the database so here we need php to bring data of the user from the database and display it to the user. One of the most biggest advantages of PHP is that it is used to make dynamic webpages. For example if we have to make 20 webpages all with the same template but different content and if we do it in html we will have to make 20 static pages all with the same design and different content but if we use php varaibles to save the content and display the different variables each time for different content on the same template we will just need to make a single webpage.



No comments:

Post a Comment