We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

what exactly does javascript do?

I'm learning javascript and a little confused as to what javascript does that html and css don't do. I know people say it adds functionality but what does that mean exactly?

1 Reply

DL Deepa Loganathan Syncfusion Team November 28, 2018 06:56 AM UTC

Hi Ramesh,  
 
Thanks for contacting Syncfusion support.  

In short, CSS is a design language that lets you format the appearance and layout of each HTML elements of your webpage by modifying its properties. Whereas, JavaScript is language that lets you control the behavior of elements with respect to user interaction to provide dynamic web pages.
 
 
In detail,  
 
Javascript can do more when compared to CSS. While CSS is meant for deciding the presentation, layout and formatting of your webpage, Javascript can do the following. 
1.      Determine how the element should behave for each user interaction like browser resizing, click, tap, mouse wheel, key press 
2.      Add client side validation in form submit action 
3.      Read an change the content of the HTML 
4.      Alter the behavior of HTML elements with respect to user interaction at run time. 
 
Regards,  
Deepa L. 


Loader.
Live Chat Icon For mobile
Up arrow icon