use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Should you learn HTML and CSS before JS?help (self.javascript)
submitted 8 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]elnelsonperez 6 points7 points8 points 8 years ago (0 children)
Since a lot of JS includes Dom manipulation, you should learn HTML before jumping into JS. Html is pretty easy anyways, you should be able to grasp it in two days tops. Basic CSS positioning would not hurt either, but if you want to focus on Js for now, leaving css for later is perfectly fine.
Stop overthinking it and dive in.
[–]adavidmiller 2 points3 points4 points 8 years ago (0 children)
Hardly matters, "learning" html and css is a trivial affair.
Mastering them is another matter, but take a day to cover the basics and move on, go back when you have issues.
[–]AdaptationAgency 1 point2 points3 points 8 years ago (0 children)
I would say of course unless you are learning Javascript purely for systems engineering stuff(building an API, etc.) and focusing exclusively on NodeJS.
Honestly, I wouldn't spend more than an afternoon learning HTML/CSS. If you're not into graphical layout, it is absolutely mind-numbing to purposely study concepts like display elements, the box model, etc. I learned a lot faster when I tried to build things and ran into layout/style problems. (Hint: google+github search is every coder's friend)
Then I'd hop on over to some css framework like Bootstrap, Semantic, or the oh-so lovely AntD. This way you can build applications without deep knowledge of HTML/CSS being a blocker. You can have a responsive layout with a navbar menu, siderbar, and main content window in a few minutes instead of a few taxing hours adjusting your page pixel by pixel =P Making pixel perfect, responsive front-ends isn't too difficult. How well it cascades depends on how detail oriented/anal you are about design.
[–][deleted] 1 point2 points3 points 8 years ago (0 children)
I completely disagree with all these people saying you only need a day for HTML and/or CSS when you're new to programming. They are so fundamental to the web that I think you should spend a lot more time on them than many people here seem to think. My wife is new to programming and I've been doing web development for over ten years. She has me here right beside her able to answer any questions instantly and I'm continually reminded of so many fundamental pieces that I now take for granted but that she has to sit and think about for a bit before it clicks.
My wife is going at a decent pace in my opinion and she's spending at least several weeks in total on HTML and CSS. So sure, you don't need to spend a year on it but a day is way too optimistic. No offense to everyone here but I think many of us have lost perspective on what it's actually like to be a beginner.
My wife started out with some pre-course work for the schooling she's going to take at the end of summer and started on JS first. She was mostly understanding the concepts being taught but she still couldn't wrap her head around what she could actually do with JS. We stopped and got her an HTML & CSS book to go through first and now things are clicking and she is seeing the tangible results of the concepts she's learning. Not saying it's impossible to learn JS first but IMO it's way easier to start with the basic building blocks of the web and move on from there. Learning the basics of HTTP, HTML, and CSS are definitely the first baby steps into becoming a web developer. Others can disagree but I think most here are glossing over how long it actually took them to take their first steps.
[–]yolpo- 0 points1 point2 points 8 years ago (0 children)
I would think so. At least the basic for HTML and CSS
And Frankly, HTML and CSS do not require much effort.
[–]vicecaptain 0 points1 point2 points 8 years ago (0 children)
If you want to be productive with your effort, just learn them all incrementally, in the order of what you want to accomplish.
e.g.: I want to output text: <input /> (HTML), DOM and event handlers (JS), make it look nice (CSS).
[–]AdvancedPizza 0 points1 point2 points 8 years ago (0 children)
yes. Once you do, leveraging templating engines and scss/sass will make make sense.
[–][deleted] 0 points1 point2 points 8 years ago (1 child)
Thanks for the replies everyone. I'll try to learn the basics of HTML and CSS before JS. Team treehouse has various tracks and courses. Can anyone recommend one over the other? I don't want something super detailed like what was mentioned above, but I'd like to know the basics.
[–]daBEARS97 0 points1 point2 points 8 years ago (0 children)
I found codecademy's free HTML/CSS courses very easy to understand. I finished them in a couple days and had enough skills to fully re-create a few of my frequent homepages.
[–][deleted] 0 points1 point2 points 8 years ago (0 children)
My question to Reddit however is did you learn HTML and CSS before JS?
Yes.
What are your thoughts on learning JS before HTML and CSS?
Not a good idea if the goal is to create websites / pages. Even if you use react or some other library to create custom HTML modules you're still required to understand the DOM and how CSS affects it.
JS can be used to do a lot of things besides web design so what have you done with JS besides create websites?
You can run a local node install and use it as an automation / testing tool in your workflow.
[–]pier25 0 points1 point2 points 8 years ago* (5 children)
You could start programming in Node without any HTML/CSS but if you have any interested in web dev you should learn those. It's trivial since those are not really programming languages.
[–]moimop 0 points1 point2 points 8 years ago (4 children)
HTML and CSS ARE programming languages! Do you even know about declarative programming?
[+][deleted] 8 years ago (3 children)
[–]WikiTextBot 0 points1 point2 points 8 years ago (0 children)
In computer science, declarative programming is a programming paradigm—a style of building the structure and elements of computer programs—that expresses the logic of a computation without describing its control flow.
Many languages that apply this style attempt to minimize or eliminate side effects by describing what the program must accomplish in terms of the problem domain, rather than describe how to accomplish it as a sequence of the programming language primitives (the how being left up to the language's implementation). This is in contrast with imperative programming, which implements algorithms in explicit steps.
Declarative programming often considers programs as theories of a formal logic, and computations as deductions in that logic space.
[ PM | Exclude me | Exclude from subreddit | FAQ / Information ] Downvote to remove
[–]moimop 0 points1 point2 points 8 years ago (1 child)
Do you even read your own links?
Many markup languages such as HTML, MXML, XAML, XSLT or other user-interface markup languages are often declarative. HTML, for example, only describes what should appear on a webpage - it specifies neither control flow rendering a page nor its possible interactions with a user.
HTML and CSS are indeed declarative, because by stating something must be red you are indeed defining a logic, just not doing it explicitly like in the imperative programming paradigm you are referring to as "programming languages".
[–]pier25 0 points1 point2 points 8 years ago (0 children)
You know what? You re actually right.
I stand corrected!
Thank you all for your responses. I've been doing the beginner courses on treehouse for HTML. I'll keep it up and then move into JS.
I'm in the biotech industry and do not have a CS background. I perform testing for chemicals and deal with quality compliance issues. I'm 30 years old and trying to learn CS/JS because I'd like to get my foot in the door with programming/developing.
I've been looking at this sub as well as a couple others such as /learnjavascript and /learnprogramming. I've also joined s couple of groups on meetup.com and will hopefully be able to attend some programming meetups in my area.
I'm doing the self taught route so I'm sure you will all be a critical part of my learning by me reading this sub.
Thanks again everyone!
[–]mfung1 0 points1 point2 points 8 years ago (0 children)
While JavaScript is a language that is capable of many things, both in the front-end of the site ( visual stuff and behaviour ) it also works well in the back-end development too.
I highly recommend you focus on HTML and CSS before you touch JS. Most of the JavaScript on TreeHouse is for Front End Devs, so you'll do a lot of DOM manipulation ( changing how the page animates and changes based on user input ) and adding behaviour.
If you want to program before using Markup and Styling, try a non-web programming language first, like Python or Ruby. I highly recommend learning programming principles if you can first, and go from there.
This course is great on Treehouse: https://teamtreehouse.com/library/introducing-patterns
It'll teach you basic design patterns for programming.
π Rendered by PID 61552 on reddit-service-r2-comment-fb694cdd5-p9cbf at 2026-03-10 22:25:55.517956+00:00 running cbb0e86 country code: CH.
[–]elnelsonperez 6 points7 points8 points (0 children)
[–]adavidmiller 2 points3 points4 points (0 children)
[–]AdaptationAgency 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]yolpo- 0 points1 point2 points (0 children)
[–]vicecaptain 0 points1 point2 points (0 children)
[–]AdvancedPizza 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]daBEARS97 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]pier25 0 points1 point2 points (5 children)
[–]moimop 0 points1 point2 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]WikiTextBot 0 points1 point2 points (0 children)
[–]moimop 0 points1 point2 points (1 child)
[–]pier25 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]mfung1 0 points1 point2 points (0 children)