211k views
1 vote
Which of the following programming languages adds interactivity to websites?

A. HTML
B. JavaScript
C. Ruby
D. C++

User Amedina
by
8.3k points

1 Answer

5 votes

Final answer:

option b,JavaScript is the programming language that adds interactivity to websites, distinct from HTML, Ruby, and C++ which have different primary uses.

Step-by-step explanation:

The programming language that adds interactivity to websites is JavaScript. HTML is a markup language used for structuring the content of a webpage. While it allows for the creation of static web pages, it doesn't provide interactivity. Meanwhile, JavaScript is a scripting language that runs on the client-side and allows for dynamic and interactive elements on websites.

For example, JavaScript can be used to create dropdown menus, validate form inputs, or display animations on a webpage. It can respond to user interactions, such as button clicks or mouse movements, and update the page accordingly.

On the other hand, Ruby and C++ are general-purpose programming languages that can be used for a wide range of applications, but they are not specifically designed for web development.

User Louis Brandy
by
7.4k points