这个HTML标签到底做什么?

这个HTML标签到底做什么?,html,css,Html,Css,事实上,我有一个与我的源代码,我确实了解整个除了下面的代码,所以请为我提供这个标签的正确解释。 就是它 节目中 <html lang="en" class="no-js"> <head> <meta charset="UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=devic

事实上,我有一个与我的源代码,我确实了解整个除了下面的代码,所以请为我提供这个标签的正确解释。 就是它

节目中

<html lang="en" class="no-js">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Circular Navigation - Interactive Demo | Codrops</title>
<meta name="description" content="Circular Navigation Styles - Building a Circular     Navigation with CSS Transforms | Codrops "/>
<meta name="keywords" content="css transforms, circular navigation, round navigation,     circular menu, tutorial"/>
<meta name="author" content="Sara Soueidan for Codrops"/>
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
</head>
<body>
<div class="cn-wrapper">
<ul>
<li><a href="#"><span class="icon-picture"></span></a></li>
<li><a href="#" class="active"><span class="icon-headphones"></span></a></li>
<li><a href="#"><span class="icon-home"></span></a></li>
<li><a href="#"><span class="icon-facetime-video"></span></a></li>
<li><a href="#"><span class="icon-envelope-alt"></span></a></li>
</ul>
</div>
<div class="steps">List items are positioned absolutely. Anchor tags inside them are also positioned absolutely, and their size is given so that they are visible at the end of     the      transformation. Red dot represents the container's center.</div>
<button class="play-button">Start Demo</button>
<button class="step-button">Next Step</button>
<button class="reset-button" disabled>Reset</button>
<span><em>*Best experienced in Chrome</em></span>
<ul class="info">
<li>List Item</li>
<li>Nav Container</li>
<li>Anchor inside List Item</li>
<li>Container center</li>
</ul>
<a class="back" href="http://tympanus.net/codrops/?p=16114">
<span>Back to the Codrops Article</span>
</a>
<script src="js/vendor/jquery-1.10.1.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>

html标记包装任何html页面。Lang是用于指定内容所用语言的属性,class是用于在CSS或jQuery中选择标记的class属性。

for Lang=en


对于class=no js,class属性的主要用途是在css或脚本语言中用作选择器。HTML lang属性可用于声明网页或网页的一部分的语言。这是为了帮助搜索引擎和浏览器。 英语-英语 从

NoJS类由Modernizer功能检测库使用。当Modernizer加载时,它用js替换no js。如果禁用了JavaScript,则该类将保留。这允许您编写CSS,它可以轻松地针对任何一种情况。 根据@Zach_L在

中的回答,您可以:

html-标记告诉浏览器这是一个html文档,它表示html文档的根。它是所有其他HTML元素的容器

lang-说明内容的包装语言

类-定义样式表中使用的css类

我想补充一点,我发现modernizer使用了no-js类。其具体功能可在此处阅读:

接下来,将类“no js”添加到元素中:

当Modernizer运行时,它将用类“js”替换该类 这使您能够知道,在CSS中,JavaScript是否可用 启用。但Modernizer并不止于此:它将为用户添加类 它检测到的每个功能,如果浏览器 不支持它。因此,您的元素看起来像 启用了提供JavaScript的页面加载时:

<html class=“js canvas canvastext no-geolocation rgba hsla multiplebgs
borderimage borderradius boxshadow opacity cssanimations csscolumns
cssgradients cssreflections csstransforms csstransforms3d
csstransitions video audio localstorage sessionstorage webworkers
applicationcache fontface”>
参考资料:

来源:

HTML元素或HTML根元素表示HTML或XHTML文档的根。所有其他元素都必须是此元素的后代

正如@Buch所说,lang属性表示页面内容所使用的语言,class属性的工作方式与其他元素的class属性类似。当javascript库(例如,正在执行功能检查)时,通常会使用您显示的一个,因此在您的javascript中,您可以检查body标记上是否存在不同的类,以确定当前浏览器支持哪些功能

-编辑-
因为语言对各种语言代码有一个解释:在你的例子中,en代表英语。

给你:那么,在那里面,en代表什么?en代表英语,hanx代表你有价值的答案,伙计
<html class=“js canvas canvastext no-geolocation rgba hsla multiplebgs
borderimage borderradius boxshadow opacity cssanimations csscolumns
cssgradients cssreflections csstransforms csstransforms3d
csstransitions video audio localstorage sessionstorage webworkers
applicationcache fontface”>