+ 4

Why is my HTML file opened in the internet as a TEXT format and not as a HTML?

I saved my doc. as ".HTML" file,but stil it opens a text format on the internet...what am i doing wrong!?!

27th May 2018, 9:58 PM
Tihomir
Tihomir - avatar
28 odpowiedzi
+ 10
Tihomir Depends on your operating environment. You will have to enable file extension viewing/editing to achieve what you are trying to do. I assume you are operating on Windows? http://www.thewindowsclub.com/show-file-extensions-in-windows At the current point, it seems like you are just editing the filename instead of the extension. The first step to editing the extension would be to get your comp to actually show it.
28th May 2018, 3:56 AM
Hatsy Rei
Hatsy Rei - avatar
+ 9
For future reference, you can force notepad to save the file with exactly the filename you specify by wrapping the name in "double quotes". https://lifehacker.com/5883860/change-the-file-extension-of-any-file-through-windows-save-as-menu
28th May 2018, 4:12 AM
Kirk Schafer
Kirk Schafer - avatar
+ 8
Also re: Vitruvian, I thought it would be nice to upvote you -- especially for pointing out that I started out omitted clarity -- but that may not be clear enough so I'm just adding "thanks for the feedback".
28th May 2018, 4:23 AM
Kirk Schafer
Kirk Schafer - avatar
+ 7
"...opened in the Internet" implies there is a server. If anything, I think the question may be confusing to others, but I wasn't trying to highlight that because I'm not speaking for anyone else but myself.
28th May 2018, 1:03 AM
Kirk Schafer
Kirk Schafer - avatar
+ 7
I read the question and answers. If @Tihomir was able to open the file on the Internet -- an assumption that may have been made without checking how this is possible -- it would already have the CORRECT EXTENSION (HTML), OR: The extension typed into the browser would result in 404 Not Found - because FILE.HTML.TXT is not what the server is retrieving (so, OP's not getting plain text back) OR: The OP would probably sense something was wrong because the URL working as FILE.HTML.TXT means the server is doing exactly what it's supposed to. The content-headers would tell me if the server interpreted the file as text/plain. If there was no server, then the question needs work. If there is a server, then it seems like the only person who knows how servers work -- regardless of whether that's what's being used here -- is the MOD, and instead of poisoning the thread -- which is somehow in your minds a place of leverage -- I was willing to wait for the OP TO CLARIFY. To put this another way, have you tried asking?
28th May 2018, 1:43 AM
Kirk Schafer
Kirk Schafer - avatar
+ 6
What's the webserver that's serving your file? * IIS, Apache, nginx, localhost via file:/// etc? Does it have the HTML file type enabled? Is the mime type correct? You can use this code to answer the last questions. Change [JS] line 6 to your URL, then copy+paste the Response Headers section (I especially want to see the "content-type" header) https://code.sololearn.com/WqstFvNgEVIy/?ref=app You may remove anything that shows your website URL (sometimes this is included).
27th May 2018, 11:40 PM
Kirk Schafer
Kirk Schafer - avatar
+ 6
Vitruvian Conversation at hand isn't working so make me self-conscious? Not sure this is the best game to enter with me here.
28th May 2018, 1:17 AM
Kirk Schafer
Kirk Schafer - avatar
+ 6
Tihomir Please read my longer response; it's intended to provide additional content you can use to diagnose your problem (and perhaps understand my original post, since I'm not above trying to clarify that). The rest of the response is just to provide a broad surface to see who still wants to attack me instead of helping.
28th May 2018, 1:50 AM
Kirk Schafer
Kirk Schafer - avatar
+ 5
Vitruvian or maybe Kirk Schafer is just trying to help because the question is not clear.
28th May 2018, 1:49 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
+ 4
uid I might be wrong...no I know I am wrong...but why not give it a try. If no particular file is specified, the directory index file will be the first file the server loads from a folder. The server looks for these specific files in the following order: index.htm, index.html and last index.php
28th May 2018, 3:25 AM
Michelangelo
Michelangelo - avatar
+ 4
i didnt save it with .txt, but the internet displeys it like that... mi file is save like this " first.html" and when I open it throu internet, the adress is this "first.html.txt" and it is like I opend notepad on internet, its not displayed like in the course ( in this app HTML course)
28th May 2018, 3:58 AM
Tihomir
Tihomir - avatar
+ 4
Hatsy Rei thank u!!! i needed to change it in windows controle panel like in the link u added
28th May 2018, 4:06 AM
Tihomir
Tihomir - avatar
+ 4
it works now :)) thank u all!!
28th May 2018, 4:06 AM
Tihomir
Tihomir - avatar
+ 3
Save As with a text editor that supports .html extensions.
27th May 2018, 10:33 PM
Apple Blossom
Apple Blossom - avatar
+ 2
try to copy-paste your code into notepad and choose "save as" with the extension html. if you only change the filename by adding ".html" it wont work. windows sees it as part of tbe filename, not as an extension.
27th May 2018, 10:24 PM
storm
storm - avatar
+ 2
storm it is possible I've been foing that only changing extensions I use WPS office it's just so cool
27th May 2018, 10:27 PM
Scorpia Rising🎩
Scorpia Rising🎩 - avatar
+ 2
kirk, i think its not on the server... ( I think )... what i did is that i wrote it in Notepad, saved it with ".html" and used "open with" by right cliking on it. i selected Internet program to open my file and the internet opened it as "title.html.txt".... so i dont think it is on any server yet. could that be the problem???
28th May 2018, 3:34 AM
Tihomir
Tihomir - avatar
+ 1
it is saved "save as" And in notepad...
27th May 2018, 10:29 PM
Tihomir
Tihomir - avatar
+ 1
@uid Oh, I almost forgot. I did omit answering s/t in the form of a double-judgment (psychology), despite feeling it could be a new Q&A. My hope was to avoid anything d.j.'s get a bad rap for* and highlight its use as a teaching tool--since the asker is likely in control of and already knows the best answer. Unfortunately, I was distracted by the OP's clarification + adding something non-interfering but relevant as you collectively finished helping. Having seen your code before, I thought perhaps you yourself would be able to take that question and use it to improve other learner's lives. * à la: law enforcement
28th May 2018, 9:40 PM
Kirk Schafer
Kirk Schafer - avatar
+ 1
save your text in simple letters .html
8th Jun 2018, 3:08 PM
Theekshana Samaranayake
Theekshana Samaranayake - avatar