2

I'm trying to connect a JavaScript document to an HTML document. Sublime isn't showing the right recognition of the .style.display (it's supposed to be blue, it's showing white, as shown).

What is wrong with my code? Or is there something missing in my Sublime? Is there a package I have to download?

For more reference, both files are in a folder called "js" on my Mac's desktop.

HTML Code Javascript Code

2
  • 3
    Welcome to Stack Overflow! Please take the tour, have a look around, and read through the help center, in particular How do I ask a good question? Post code and markup and such as text, not as a picture of text. Why: meta.stackoverflow.com/q/285551/157247 Commented Sep 22, 2018 at 23:20
  • 1
    This question was purely about the color scheme so posting pictures was probably ok. However this is not a question about javascript or HTML but purely about sublimetext. Commented Sep 23, 2018 at 1:06

1 Answer 1

3

Sublime has different colour schemes for different languages. In your first image you have HTML-markup and in the second it's JavaScript. There's nothing wrong with either the code nor your Sublime setup.

Although one thing that might a problem, if both the HTML and JS files are in the same folder you don't need to reference from Desktop/js/script.js, you can just reference script.js in the script-tag.

Sign up to request clarification or add additional context in comments.

2 Comments

@thenabh if this answers your question you should consider to upvote it and accept it. you can upvote multiple questions but you can only accept one. You can always change your decision tho.
Thanks! I'm super new. But did so.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.