Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the differences between javascript and html

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article is about the differences between javascript and html. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Differences: 1, HTML is a markup language, JavaScript is a scripting language; 2, HTML provides static content on the web page, JavaScript adds dynamic functions to static web pages; 3, HTML is based on W3C and WHATWG standards, JS is based on ECMA standards; 4, HTML compatibility is better than JS.

The operating environment of this tutorial: windows7 system, javascript1.8.5&&HTML5 version, Dell G3 computer.

The difference between JavaScript and HTML

1. Essential difference

HTML is a markup language and JavaScript is a scripting language.

HTML, that is, Hypertext markup language (Hyper Text Markup Language), is an application under the standard general markup language. HTML is not a programming language, but a markup language (markup language), which is necessary for web page making.

JavaScript (usually abbreviated to JS) is a high-level, interpreted programming language. JavaScript provides syntax to manipulate text, arrays, dates, regular expressions, etc., and does not support Imax O, such as network, storage, graphics, etc., but these can be supported by its hosting environment.

2. Differences in usage

HTML provides static content on a web page. JavaScript adds dynamic functionality to static web pages.

JavaScript can be embedded in HTML, but HTML cannot be embedded in JavaScript.

3. Differences in standardization

HTML is based on W3C and WHATWG standards, and JavaScript is based on ECMA standards.

4. Compatibility difference

HTML is cross-browser compatible, which means it is compatible with all versions of all web browsers, including modern browsers. All browsers, old or new, treat unrecognized elements as inline elements by default, which makes it easy for old web browsers to deal with unknown HTML elements.

On the other hand, JavaScript lacks cross-browser compatibility, which makes some functions incompatible with some browsers.

Thank you for reading! This is the end of the article on "what are the differences between javascript and html". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report