We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Software

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What Are HTML Scripts?

By Eugene P.
Updated: May 17, 2024
Views: 5,212
References
Share

HyperText Markup Language (HTML) documents can contain pieces of programming code, or links to source code files, that are executed at different points while viewing or navigating a web site. These blocks of code generally are referred to as HTML scripts, because they are embedded in the HTML code read by the browser and are executed, at least in part, by the browser; they also are known as client-side script. The most popular HTML scripts are written in a language known as JavaScript®, although it is possible to write HTML scripts in Visual Basic Scripting Edition® and the Tool Command Language (TCL). The purpose of HTML scripts usually is to extend the interactivity of a website by allowing the fast client-side processing of information the user provides, although they also can be used to create visual effects such as animations, games or dynamic graphs. Most often, an HTML script is inserted into an HTML document through the use of the script tag.

There is a technical distinction between HTML scripts and other types of compiled applications or interactive elements that can be used on a website. The script usually is written in a human-readable scripting language and then embedded in an HTML document in some way. Alternately, a web-based application usually is written in a language that requires the code to be compiled in machine code or bytecode that then is executed by a standalone interpreter on the user’s system. Scripts generally are executed by the web browser or a plug-in for the web browser.

Another difference is that HTML scripts tend to be less full-featured than compiled programming languages, relying more on the base functionality of the web browser and HTML for some internal aspects. This makes a script easier and safer to execute in a browser, but also can restrict performance and other features, such as file and hardware access. Some client-side scripts only partially execute inside the web browser, instead contacting the web server to complete execution through other methods. This technique frequently is used for secure or proprietary processing of information, as can be the case on an e-commerce website.

In most instances, HTML scripts are used to access components of a website through the web browser. This allows access to the rendering canvas where the site is drawn, variables such as the background color of a page, or even user events such as mouse movements or button clicks. Complex HTML scripting languages have a structured or object-oriented syntax, allowing the creation of complete applications such as games or word processors. Other times, HTML scripts are used to process data from HTML forms so inputted values are range-checked, converted to other types of data or even formatted for output to a server.

Share
WiseGeek is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Link to Sources

Editors' Picks

Discussion Comments
Share
https://www.wisegeek.net/what-are-html-scripts.htm
Copy this link
WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.

WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.