📜  HTML 和 ASP 的区别

📅  最后修改于: 2021-09-14 02:44:05             🧑  作者: Mango

HTML 和 ASP 是 Web 编程世界中两个非常常见的方面。

HTML 代表用于开发网页,特别是网页设计的超文本标记语言。它们主要使用 HTML 元素编写,由标签、开始标签和结束标签组成。这些标签之间的数据通常是内容。 HTML 的主要目标是允许 Web 浏览器解释标签之间的内容,然后显示它们。

ASP 代表活动服务器页面。通常称为经典 ASP 或 ASP 经典。 Microsoft 开发了这种服务器端脚本环境,专门用于动态生成的网页。它最初作为 Windows NT 4.0 Option Pack 的一部分发布,现在已被 Microsoft 的另一款产品 ASP.NET 所取代。主要用于运行和创建动态 Web 服务器应用程序,它允许结合 HTML 页面、脚本命令和 COM 组件。它使修改和开发 Web 应用程序变得更加容易。

下表列出了 ASP 和 HTML 之间的差异:

ASP HTML
ASP is a server-side language. This means that the code that is written gets sent to the server, and it returns some code depending on what it was asked to do. HTML is a client-side language. Basically it has to do with the user interface, with which the user interacts. This interface, is most often, the browser on the user’s machine.
ASP can use any scripting language, so as to embed programming and server side directives into a HTML web page. HTML allows web browsers to interpret display content written between tags. It allows images and objects to be embedded in the webpage.
ASP is used to design user-interactive or dynamic web pages. HTML is basically used to create static web pages.
ASP is case sensitive. HTML is not case sensitive.
ASP or ASP.NET pages can connect to the database so as to derive its content. HTML cannot connect to a database.
When the browser requests an ASP file, it passes request to the ASP engine. The ASP engine reads the file, line by line, and then executes the script line by line. Finally the ASP file returns to the browser as plain HTML. When a browser requests an HTML file, the server returns the file.

参考资料: http://www.differencebetween.info/difference-between-asp-and-html