Websites provide a lot of web pages with different URLs but there are some defacto pages that exist most of the web sites. index.html is one of them. index.html is used as the main or entrance page for the whole web site or web application.

网站提供了许多具有不同URL的网页,但是大多数网站上都存在一些事实上的页面。 index.html是其中之一。 index.html用作整个网站或Web应用程序的主页或入口。

什么是index.html? (What Is index.html?)

As its name suggests index.html consists of two words index and html. The index simply means shortlist for multiple items. In web terminology generally used to showcase the website pages, categories or parts on a single page. Html simply an extension for the index file which means the index file is an HTML file that contains HTML code or tags with some CSS and JavaScript code. index.html file generally resides in the root path of the web page and when the web site like http://www.poftut.com is requested by default index.html file is returned.

顾名思义,index.html由两个单词indexhtml 。 该索引只是意味着多个项目的候选清单。 在网络术语中,通常用于在单个页面上展示网站页面,类别或部分。 HTML只是索引文件的扩展名,这意味着索引文件是一个HTML文件,其中包含HTML代码或带有一些CSS和JavaScript代码的标签。 index.html文件通常位于网页的根路径中,并且默认情况下,当请求http://www.poftut.com之类的网站时,将返回index.html文件。

什么包含index.html? (What Contains index.html?)

As stated previously index.html file contains mainly HTML code or tag with some CSS and JavaScript code. The client web browser will render and show the HTML, CSS and JavaScript code. For example, the following screenshot is the https://www.apachefriends.org/index.html. This is the main page of the apachefriends.org which contains content like text, header, video, menus, categories, links etc.

如前所述,index.html文件主要包含HTML代码或带有一些CSS和JavaScript代码的标签。 客户端网络浏览器将呈现并显示HTML,CSS和JavaScript代码。 例如,以下屏幕截图是https://www.apachefriends.org/index.html 。 这是apachefriends.org主页,其中包含诸如文本,标题,视频,菜单,类别,链接等内容。

What Contains index.html?
什么包含index.html?

index.html代码 (index.html Code)

There is no standard about the index.html code but there are some regular code parts generally used in index.html. Below we can see that the JavaScript code is defined inside the head part of the web page. Also, the links and menu are defined as the first element of the index.html.

关于index.html代码没有标准,但是index.html中通常使用一些常规代码部分。 在下面,我们可以看到JavaScript代码是在网页顶部定义的。 同样,链接和菜单被定义为index.html的第一个元素。

.u76ef3500e3feb915092818dcde23a74a , .u76ef3500e3feb915092818dcde23a74a .postImageUrl , .u76ef3500e3feb915092818dcde23a74a .centered-text-area { min-height: 80px; position: relative; } .u76ef3500e3feb915092818dcde23a74a , .u76ef3500e3feb915092818dcde23a74a:hover , .u76ef3500e3feb915092818dcde23a74a:visited , .u76ef3500e3feb915092818dcde23a74a:active { border:0!important; } .u76ef3500e3feb915092818dcde23a74a .clearfix:after { content: ""; display: table; clear: both; } .u76ef3500e3feb915092818dcde23a74a { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .u76ef3500e3feb915092818dcde23a74a:active , .u76ef3500e3feb915092818dcde23a74a:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .u76ef3500e3feb915092818dcde23a74a .centered-text-area { width: 100%; position: relative; } .u76ef3500e3feb915092818dcde23a74a .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .u76ef3500e3feb915092818dcde23a74a .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .u76ef3500e3feb915092818dcde23a74a .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .u76ef3500e3feb915092818dcde23a74a:hover .ctaButton { background-color: #E67E22!important; } .u76ef3500e3feb915092818dcde23a74a .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .u76ef3500e3feb915092818dcde23a74a .u76ef3500e3feb915092818dcde23a74a-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .u76ef3500e3feb915092818dcde23a74a:after { content: ""; display: block; clear: both; }

LEARN MORE  CSS Rounded Corners for HTML Elements

.u76ef3500e3feb915092818dcde23a74a , .u76ef3500e3feb915092818dcde23a74a .postImageUrl , .u76ef3500e3feb915092818dcde23a74a .centered-text-area { min-height: 80px; position: relative; } .u76ef3500e3feb915092818dcde23a74a , .u76ef3500e3feb915092818dcde23a74a:hover , .u76ef3500e3feb915092818dcde23a74a:visited , .u76ef3500e3feb915092818dcde23a74a:active { border:0!important; } .u76ef3500e3feb915092818dcde23a74a .clearfix:after { content: ""; display: table; clear: both; } .u76ef3500e3feb915092818dcde23a74a { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .u76ef3500e3feb915092818dcde23a74a:active , .u76ef3500e3feb915092818dcde23a74a:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .u76ef3500e3feb915092818dcde23a74a .centered-text-area { width: 100%; position: relative; } .u76ef3500e3feb915092818dcde23a74a .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .u76ef3500e3feb915092818dcde23a74a .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .u76ef3500e3feb915092818dcde23a74a .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .u76ef3500e3feb915092818dcde23a74a:hover .ctaButton { background-color: #E67E22!important; } .u76ef3500e3feb915092818dcde23a74a .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .u76ef3500e3feb915092818dcde23a74a .u76ef3500e3feb915092818dcde23a74a-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .u76ef3500e3feb915092818dcde23a74a:after { content: ""; display: block; clear: both; }

了解更多HTML元素CSS圆角

index.html Code
index.html代码

index.html基本结构(index.html Basic Structure)

When we look at an index.html file we can see that there is some basic structure that is mostly used in most of the web site’s other pages.

当我们查看index.html文件时,我们可以看到存在一些基本结构,该结构主要在大多数网站的其他页面中使用。

  • `Menu` will contain shortcuts to other pages of the sites.“菜单”将包含指向网站其他页面的快捷方式。
  • `Main Content` generally contains information about the web site and some latest or generic or definitive information about the web site.“主要内容”通常包含有关网站的信息以及有关该网站的一些最新或通用或权威性信息。
  • `Footer` may contain some social media link, contact information, copyright information, etc.“页脚”可能包含一些社交媒体链接,联系信息,版权信息等。

index.html的位置 (Location Of The index.html)

The index.html file is stored inside the web site root directory of the webserver. If the webserver is Apache2 the default path is /var/www and the web site folder name. If the webserver is IIS the path will be C:\inetpub\sites by default but change according to specific web site configuration.

index.html文件存储在Web服务器的网站根目录中。 如果Web服务器是Apache2,则默认路径是/var/www并且网站文件夹名称。 如果Web服务器是IIS,则默认情况下路径为C:\inetpub\sites ,但根据特定的网站配置进行更改。

index.html与index.htm (index.html vs index.htm)

Well, we can see some minor changes in the usage of the index.html web page. index.htm is an alternative to the index.html file. index.htm is generally used in Windows servers but almost the same HTML, CSS and JavaScript code is used.

好吧,我们可以看到index.html网页的用法有一些小的变化。 index.htm是index.html文件的替代方法。 index.htm通常在Windows服务器中使用,但是使用几乎相同HTML,CSS和JavaScript代码。

index.html替代方法 (index.html Alternatives)

index.html was popular a long time ago. Currently, most of the web sites prefer index.php or nothing where index.html is not used. But there are some alternatives that are mostly used with dynamic server-side applications or sites like PHP , Python, ASP.NET, etc.

index.html很久以前就很流行。 当前,大多数网站更喜欢index.php或不使用index.html的网站。 但是,有些替代方案通常用于动态服务器端应用程序或站点,例如PHP,Python,ASP.NET等。

  • `index.asp` is used by ASP.NET web sites or web applications.ASP.NET网站或Web应用程序使用“ index.asp”。
  • `index.php` is used by PHP web applications.PHP Web应用程序使用`index.php`。
  • `default.html` or `home.html` are also alternatives to the index.html.default.html或home.html也是index.html的替代方案。

翻译自: https://www.poftut.com/what-is-index-html-how-to-create-and-use-index-html/

什么是index.html? 如何创建和使用index.html?相关推荐

  1. Tp5自动加载创建admin和index文件夹

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/yumon321/article/det ...

  2. oracle 创建索引 CREATE INDEX

    CREATE INDEX -- 定义一个新索引 Synopsis CREATE [ UNIQUE ] INDEX name ON table [ USING method ]( { column | ...

  3. 如何创建index.php文件,index.html是什么意思/文件,index.html怎么创建/打开

    index.html是什么意思/文件,index.html怎么创建/打开 内容导读:index.html是具体的页面,它通常被用来作为网站或者是目录默认打开的页面,它可以是实际存在的页面,也可以通过数 ...

  4. SQL CREATE INDEX (mysql 创建索引)语句

    ** SQL CREATE INDEX (mysql 创建索引)语句 ** 1.创建普通索引 SQL CREATE INDEX 语法 在表上创建一个简单的索引.允许使用重复的值: CREATE IND ...

  5. SQL Server中的聚集索引(clustered index) 和 非聚集索引 (non-clustered index)

    1. 什么是聚合索引(clustered index) / 什么是非聚合索引(nonclustered index)? 2. 聚合索引和非聚合索引有什么区别? 深入浅出理解索引结构 实际上,您可以把索 ...

  6. 聚合索引(clustered index) 和 非聚合索引(nonclustered index)

    以下我面试经常问的2道题..尤其针对觉得自己SQL SERVER 还不错的同志.. 呵呵 很难有人答得好..  各位在我收集每个人擅长的东西时,大部分都把SQL SERVER 标为Expert,看看是 ...

  7. ORA-01502: index ‘index_name' or partition of such index is in unusable state

    错误现象: 今天发布脚本时,一个表插入数据时报如下错误 ORA-01502: index 'index_name' or partition of such index is in unusable ...

  8. thinkphp index.php隐藏,thinkphp5怎么隐藏index.php入口文件?

    隐藏方法:1.打开apache的http.conf配置文件,开启mod_rewrite.so模块:2.AllowOverride None项中将None改为All:3.修改".htacces ...

  9. 【es】 check-rollover-ready read index [alinas-lcc] is not the wtiter index for alians [index-xx]

    1.场景1 生命周期报错,check-rollover-ready read index [alinas-lcc] is not the wtiter index for alians [index- ...

  10. dedeindex php不显示_dede去掉(禁止)首页index.html默认访问 最终显示index.php

    dede织梦系统,如果我服务器设置 默认首页文档读取 index.php ,但是 dede系统index.php是 如果存在index.html 就转到index.html 后台更新首页-动态,只是删 ...

最新文章

  1. 机器人替代研究员,工作007,完成688次实验,登上Nature封面
  2. mysql 数据库 xtrabackup (完全备份恢复,恢复后重启失败总结)
  3. 实际运维中处理的事故问题
  4. 将redis作为windows系统的系统服务
  5. 同步、异步、阻塞、非阻塞
  6. mac下安装redis
  7. qtreewidget点击空白处时取消以选项_VUE+elementUI 点击页面空白处弹窗不隐藏
  8. 机器学习的练功方式(六)——朴素贝叶斯
  9. 游戏盒子源码_如何用8K电视盒子组建“家庭影院”(设备入门篇)
  10. mysql如何进入用户权限_教您如何查看MySQL用户权限
  11. css学习_文本有关的样式属性、sublime快捷生成标签
  12. 电商平台系统架构设计案例分析
  13. 谷歌宣布退出中国 google.cn已经关闭
  14. IDEA默认KeyMap映射快捷键
  15. vue ie8 兼容方案
  16. java面试题——常见项目真实面试题(实际面试被问到)
  17. 中邮网院/邮e联下载
  18. mong 的 安装 和测试
  19. localStorage本地持久化、基本使用以及对无痕/隐私模式判断的疑问
  20. Python OpenCV学习笔记之:图像直方图均衡化

热门文章

  1. 查询央行征信的APP有哪些?
  2. 谷歌seo外链发布50+个网站平台分享(e6zzseo)
  3. 计网重点知识总结复习
  4. super关键字详解
  5. 教你将手机里的图片转成PDF的2种方法
  6. 已知一/27网络中有一个地址是167.199.170.82,问这个网络的网络掩码、网络前缀长度和网络后缀长度是多少,求这个地址块的地址数、首地址以及末地址是多少
  7. 项目管理经验-豆知识
  8. 华为设备配置Easy IP 地址转换
  9. PHP-FPM(PHP进程管理器)
  10. python 分支结构 比较大小