CSS and HTML files we cant save - html

When you save a html or Css file in VSCODE, Content disappear and cursor goes to line 1 by erasing all the content in the file. Please I need help to save css and html files, On the Editor1.css type css code and when you press Command+ S on mac book, entire file which we type get erased off and cursor goes to line 1. and not able to save Css and Html files how can we save files on VS Code Editor

Related

HTML file displays as text. Why?

I'm not using PHP. XAMPP finds my .html file just fine, BUT it doesn't process the HTML. Instead, it displays the file as text.
Why?
This could happen if you have saved the file with the option (SAVE as text FILE)
for example if you have saved your file as abc.html then it would become abc.html.txt
enter image description here
so it is supposed to be a html file but it will become text file

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). When i create the index.html file in file explorer the file that makes the most sense to me is a text file. (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.
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.
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"
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. Then you can open it in a browser like Internet Explorer and it will interperate the file as an HTML page.
You can use a program like CoffeeCup to easily edit HTML files and it will save them as plain-text.
You can't edit HTML files in rich-text editors like Word.

changing the file extension from html to .asp lost all the style and image of the website

I have created a Html file, and than i rename it with .asp as requires.I need this to upload it online .I have copy the HTML file and placed inside a ASP folder which contains the .asp files .However when i replaced with the existing one, my website was not looking good, images, text and all Looks different. some images are lost and text are not in style.
i have copy the CSS and image files from main to placed it inside a .asp folder still not solve my problems
Any shortcut method where i can do this?
What changes should I do before I change to asp
Used this code it helps to produce the right result.This is the Code that needs to setup from the .asp folder which contains the .asp file to the main folder
an eg shown below
link href="../X/css/style.css" ... />

How to write html file with a text editor

I am trying to write my first html document.
Here is the link to the reference.
I am using TextEdit on Max OSX 10.6 and after I save it (as an html file) it is opened by the browser by double clicking on it. However the source script text is shown instead of the html structure.
What I am getting wrong?
You need to convert it to a plaintext document
Click Format and then 'Make Plain Text', then make sure to save as .html
Does the icon of the file has an "e". Usually these kind of files should have an icon as an e. Also make sure you are saving it as .html file. I think the actual extension of the file is hidden.

How to edit HTML source in DevTools

I go to the sources tab and try to edit HTML file - I can't
whereas I can edit js/css files - curious, how can I edit the HTML? if I can only edit it via the Elements tab, then what can I do so those changes reflect in the HTML file found in sources? reason I ask is because I want to save the html file with all the different changes I've made using Devtools
It's weird, but I do it by changing whatever I want in the elements-tab, then right click on the <html> tag and press Copy as HTML, then make a new .txt file, paste it in there, and rename it to a .html file!