htm和html的区别_HTML vs HTM – HTML和HTM之间的区别

htm和html的区别

Do you know? Every page on the World Wide Web (WWW) is built using HTML. This is because every browser including Chrome, Firefox, Safari, and Edge understand this hypertext markup language to render what we usually call a web page.

你知道吗? 万维网(WWW)上的每个页面都是使用HTML构建的。 这是因为包括Chrome,Firefox,Safari和Edge在内的每个浏览器都理解这种超文本标记语言,以呈现通常称为网页的内容。

HTML is a markup language that helps in the formatting of different kinds of a programming language such as PHP, ASP.net, JAVA, etc. The browser reads a web page in HTML language and displays the output of back end programming performed.

HTML是一种标记语言,可以帮助格式化各种编程语言,例如PHP,ASP.net,JAVA等。浏览器以HTML语言读取网页,并显示执行的后端编程的输出。

HTML vs HTM – HTML和HTM之间的区别 (HTML vs HTM – Difference between HTML and HTM)

HTML vs HTM - Difference between HTML and HTM

.html is is the current extension of HTML web pages and files for newer operating systems. Moreover, the .html extension was introduced for security reasons as there were more security threats in the three-letter extension of .htm.

.html是用于较新操作系统HTML网页和文件的当前扩展名。 此外,由于安全原因引入了.html扩展名,因为.htm的三字母扩展名中存在更多的安全威胁。

.htm is the older version of the filename extension of HTML language. This extension was used in earlier times as the operating systems were not so powerful to handle four-letter extension. When compared to .html extension the .htm was less secured and hence .html extension came into existence.

.htm是HTML语言的文件扩展名的较旧版本。 由于操作系统不具备处理四字母扩展名的强大功能,因此在较早的时间就使用了该扩展名。 与.html扩展名相比,.htm的安全性较低,因此.html扩展名应运而生。

浏览器如何读取HTML和HTM文件 (How Browsers Read HTML and HTM files)

As we have discussed above all the web pages are rendered using HTML language by the browser. Now, let’s see how these browsers read .html and .htm web pages. For browsers to read an HTML page there is a fixed structure defined by the language. The structure needs to follow the proper alignment of all tags in a particular flow. Structure works in the workflow as:

如上所述,所有网页均由浏览器使用HTML语言呈现。 现在,让我们看看这些浏览器如何读取.html和.htm网页。 为了使浏览器阅读HTML页面,该语言定义了一种固定的结构。 该结构需要遵循特定流程中所有标签的正确对齐。 结构在工作流中的工作方式如下:

<!DOCTYPE html> <!-- It defines the version of HTML -->
 
<html> <!-- HTML root element tags that contains all the code for a webpage -->
	<head> <!-- HTML head tag in which title and heading of a web page is given -->
		<title> <!-- Title of a web page -->
		</title>
	</head>
 
	<body> <!-- HTML body tag in which all the content of a web page is written -->
	</body>
</html>

Generally for Windows operating system “Notepad editor” and for Mac OS “Text Edit” is used for creating a HTML web page. You can use any other text editor also.

通常,对于Windows操作系统“记事本编辑器”和Mac OS,“文本编辑”用于创建HTML网页。 您也可以使用任何其他文本编辑器。

This is how the browser reads HTML pages and displays content on the internet. It never displays the tags you used in creating a web page. The tags are only used for understanding the content of the web page and displaying them in the format described.

这是浏览器阅读HTML页面并在Internet上显示内容的方式。 它从不显示您在创建网页时使用的标签。 标签仅用于理解网页的内容并以所述格式显示它们。

BasisHTMLHTM
Difference of letterIt uses four-letter extension i.e. .html for handling dynamic pagesIt uses only three-letter extension i.e. .htm and is less reliable than .html
Usability.html is used as the current extension of HTML web page.htm is the older version and was used for older operating systems
SecurityHigher security with browsersLow as compared to .html
Operating systemCannot be used in old operating systems like DOSCan be used in new as well as older versions of operating systems
File sizeCan handle big file sizesCannot handle big file sizes
基础 HTML HTM
字母差异 它使用四个字母的扩展名,即.html来处理动态页面 它仅使用三个字母的扩展名,即.htm,并且不如.html可靠。
易用性 .html用作HTML网页的当前扩展名 .htm是较旧的版本,用于较旧的操作系统
安全 浏览器的更高安全性 与.html相比较低
操作系统 不能在DOS等旧操作系统中使用 可以在新版本和旧版本的操作系统中使用
文件大小 可以处理大文件 无法处理大文件

Final Words on HTML and HTM

HTML和HTM的总结

Both HTML and HTM are same and either of them can be used as a filename extension of a web page. There is no such big difference between HTML and HTM instead of security purpose. HTML is considered to handle dynamic pages and enhances the security of your web page than HTM.

HTML和HTM都相同,并且它们中的任何一个都可以用作网页的文件扩展名。 HTML和HTM在安全性方面没有太大区别。 HTML被认为可以处理动态页面,并且比HTM增强了网页的安全性。

One should use .html extension as it is given more focus in modern operating systems. Otherwise, you can use both the extension types and they will do the same work for your web page.

人们应该使用.html扩展名,因为它在现代操作系统中得到了更多的关注。 否则,您可以使用两种扩展名类型,它们将为您的网页执行相同的工作。

翻译自: https://www.thecrazyprogrammer.com/2019/08/html-vs-htm.html

htm和html的区别

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值