This is a question that you only may get opinions. There is no “best” language. You have to consider if you can get job (how common the language is), learning curve, ease of deployment and impact on the environment (less resources).
The shortcut is to use a CMS. WordPress or Drupal.
Or you can chose a a narrow path using less common tools that have less impact on the environment (read faster and smaller). Harder to learn and less community support.
This is my opinion. What I am trying to say is that it is not one straight answer.
Thank you so much for your reply.
I disagree with Python. I don’t know why some people think it’s a magic language. This language is popular only because of the libraries it has, and in my opinion, it’s trendy right now. It soon loses its popularity in many fields. For example, Julia programming language can replace it in some areas. I think you mentioned this language because of Django.
Why didn’t you mention Ruby on Rails or HTML5?
For me python is the web-application version of Java. It is popular only because it is super easy to learn and because of its strict type checking you can make less errors on writing code. So it’s the perfect language for teams where you have software-designers and software-architects who advise a cheap programmer what he has to develop.
If you have a good full stack developer, who is also involved in the design and architecture he will always prefer other languages to work with.
Choosing the best programming language or technology depends on what you want to do:
Basically all languages are possible to use for web development. Here is a link to stackoverflow survey of most used tools.
It is not a common language. See stackoverflow survey
Because you have to use HTML (markup language) regardless of which tool you use.
Learn how to program. The language at that point becomes nearly irrelevant. Language is the skin on top of a designed program.
If you’ve got a specific job you’re after (“a website developer” is not a specific job), and have the basis of understanding of programming, then you can focus on the language you need to slot into that job.
I agree with what @m_hutley says here.
A programming language is nothing other than syntax. All languages can basically do the same thing, just in different syntactical manners. If you learn the development PATTERNS, you can transition from one language to another to another relatively easy.
But on top of that, which language can you find work in? That is a bigger driver (IMHO), and why I’ve been able to work in the industry for 30 years now, constantly evolving and growing, but leaning on my knowledge of development patterns to be able to learn the different syntaxes over the years…
Java is among the most popular languages. C# is also popular. Using Webassembly, most any language, even COBOL and especially C++, can be used client-side.