简体   繁体   English

我的index.html文件应该是文本文件吗?

[英]Should my index.html file be a text file?

so i am pretty new to this and i was wondering if the index.html file for my site is supposed to be a text file (also, i'm on Windows 10). 所以我对此很陌生,我想知道我网站的index.html文件是否应该是文本文件(同样,我在Windows 10上)。 When i create the index.html file in file explorer the file that makes the most sense to me is a text file. 当我在文件浏览器中创建index.html文件时,对我来说最有意义的文件是文本文件。 (The files are: bitmap image, contact, rich text document, text document, and compressed zipped folder), So i would assume i'm supposed to pick text document. (文件是:位图图像,联系人,富文本文档,文本文档和压缩的压缩文件夹),所以我假设我应该选择文本文档。 The folder ends up looking like index.html.txt, not sure if this is how i'm supposed to do it. 该文件夹最终看起来像index.html.txt,不知道这是否是我应该做的。

Start notepad, or an editor of your choice. 启动记事本,或您选择的编辑器。 Type in the content you want for your file. 输入您想要的文件内容。 Save-As “Index.html” in the location you desire. 在所需的位置另存为“ Index.html”。

Well, the file extension is in the name itself ".html" just the same as a Cascading Style Sheet (CSS) file would be saved as a ".css" file and a Javascript file as ".js" 嗯,文件扩展名本身就是“ .html”,就像级联样式表(CSS)文件将另存为“ .css”文件,而Javascript文件另存为“ .js”一样

Everything after the "." “。”之后的所有内容。 is the type of file. 是文件的类型。

Yep, everyone above answered correctly. 是的,以上每个人都正确回答。 You want to save the file in a plain-text format with a .html at the end. 您希望将文件保存为纯文本格式,并以.html结尾。 Then you can open it in a browser like Internet Explorer and it will interperate the file as an HTML page. 然后,您可以在Internet Explorer之类的浏览器中将其打开,它将以HTML页面的形式插入文件。

You can use a program like CoffeeCup to easily edit HTML files and it will save them as plain-text. 您可以使用CoffeeCup之类的程序轻松编辑HTML文件,并将其保存为纯文本格式。

You can't edit HTML files in rich-text editors like Word. 您无法在Word等富文本编辑器中编辑HTML文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM