PonU86
PonU86

Reputation: 31

How to add script tags to html

enter image description here

Here in the image you see the code is greyed out. Before I put in the <script> tag everything was not greyed out. Once I put in the tag is greys out the rest of the code. I might be missing a file needed to run the script tags?

I have been working with code for a while, but I am still a little stuck on how to get the code set up. I am wanting to use html/css and JavaScript to make a couple websites. I am not sure how to set everything up to make it work. I also am using github, and trying to figure out how to use github-pages.

Upvotes: 1

Views: 1434

Answers (3)

Thirumalai vasan
Thirumalai vasan

Reputation: 793

As i recognize, the Atom text editor makes this error.

The best solution i tried:

IN ATOM TEXT EDITOR Windows: Ctrl + , MAC: Cmd + ,

In settings:

1. Scroll to the bottom,
2. Uncheck "Use Tree Sitter Parsers",
3. Restart Atom IDE.

That works fine for me!

Upvotes: 1

Alexis
Alexis

Reputation: 71

A simple solution that works:

  1. Just close the file being edited

  2. Click "File->Reopen Last Item" to re-open it

This is an issue with Atom, it does not detect the tag when it auto completes, it works fine in VSCode, so it's not really a problem with your code, it's the IDE enter image description here

Upvotes: 1

MaxiGui
MaxiGui

Reputation: 6348

This is a known bug, but it seems no fix have been done yet, you can report your case here, I guess: HTML Syntax Colour Bug

But you may have solution in that StackOverflow subject, if so, it would be a duplicate: Atom Code Editor. Why is my code not in color?

Upvotes: 0

Related Questions