Opening a project


#1

Hey, I’m brand new to Atom and am trying to make a project. I saved it in a file, but when I click on it, a chrome page opens up with the code I typed, not what I want the code to do. Is there a specific way to save it, or is there something I need to do with my code?


#2

Hey,

If you have Atom already open, can you open the file by using the “File > Open File” menu option?

The file association is the issue here IMHO. The file type needs to be bound to Atom if you wish to open in the way I think you are implying.

Since you have not said which code file or which OS, it is not possible to assist you further. But I am sure that a general web search can supply an answer to you.

Regards.


#3

Since we’re talking about computers, here’s the blindingly obvious answer: yes. Everything you do has to be very specific, because computers are very, very dumb and only understand what you mean if you tell them in exactly the right language. You have to follow the example of wherever you’re learning HTML from exactly. If you aren’t doing that, you won’t see the result. If you show us what you’re doing, we can tell you what you’re doing wrong, but we can’t tell you unless you show us. I’m not sure why you expect otherwise.


#4

I’m experimenting on a Gamers Guide to Coding. It has many examples of code which I can save onto my desktop which use Atom. When I click on these examples on the desktop, they implement the code in Google Chrome automatically. I saved the following code onto my desktop, which is supposed to show a picture in a certain position. When I click on the file, though, Chrome only shows me the code I typed up.

LinkMovement .Link { position: absolute left: 50px top: 50px width: 48px height: 48px } <div id="LinkNeutralForward" class="panel" alt="" src="./Link/LinkNeutralForward.png"

#5

The code did not save correctly. The site must have squished everything together in one paragraph, but it also deleted several parts.


#6
LinkMovement .Link { position: absolute left: 50px top: 50px width: 48px height: 48px } <div id="LinkNeutralForward" class="panel" alt="" src="./Link/LinkNeutralForward.png"

#7

I tried again, but the reply keeps compressing and deleting.


#8

You are posting HTML on a web forum that knows how to read it. You should mark it as code by highlighting your code and pressing the </> button above the editor.


#9

Thank you.
Here it is.

<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8" />
<title>LinkMovement</title>

<style>
.Link {
position: absolute
left: 50px
top: 50px
width: 48px
height: 48px
}
</style>
<script src="./Link/prefixfree.min.js"></script>
</head>

<body>
  <div id="LinkNeutralForward" class="Link" alt="" src="./Link/LinkNeutralForward.png"
</body>

</html>

I think the problem is when I save it to the desktop, it isn’t registered as an html. Any idea how to do that?


#10

What’s the name of the file? There’s no such thing as a registration process when it comes to file types. Both Atom and Chrome tell that a file should be displayed as HTML because it has the .html file extension.


#11

Link (basic)


#12

If there’s no .html at the end of the file name, you should add it.


#13

Thank you. I am very new to coding and am so glad that I can finally view my results.