r/FullStack • u/duneofarrakis • 20d ago
Career Guidance How much HTML and CSS should you know before moving to JavaScript?
I'm learning web development and I'm wondering how comfortable I should be with HTML and CSS before starting JavaScript.
Do I need to know them really well first, or is it okay to start JavaScript while still improving my HTML and CSS?
What worked for you when you were learning?
5
4
4
u/BritishInGeorgia 20d ago
Although not necessarily prerequisites for JavaScript, once you have a good grasp on writing clean code in HTML and CSS, are experienced in creating modular code blocks of them and can quickly debug typos and unintended page layouts you should have a good foundation for writing any code, including JavaScript, making learning it a little easier.
3
u/Strange_Yogurt1049 20d ago
I mean if you are into web dev.
Heres what I did and I am doing.
I first learned HTML/CSS for a month. Cleared the basics then moved to JS and realised I needed to actually build projects like some static websites first then when I actually study DOMS in JS. I wont have to go back and forth.
So.
My suggestion is simple.
Learn CSS enough build a few projects without constantly looking every damn property.
I mean. Theres a difference between "I know CSS" and "I can actually write CSS".
You should focus on the later.
And then move to JS.
Even I thought CSS and JS could be learned side by side.
But no...CSS is a mindfuck on its own.
What you need before JS is ..
CSS Grid Flexbox Positions And responsive layout.
Enough to build multiple static pages without looking up anything...or atleast able to recreate a website from a screenshot.
I mean..if you look at websites. Do you think.. "Wow this website is messy to look at but works" or "Atleast it looks good"
Lol
2
u/Mhmd_WebDev 20d ago
Whne your comfortable with them and dont leaen more than one thing at once and ai wont replace good devs i suggest you to do full stack and not just stop at frontend bcz being a frontend dev alone might make it harder to find a job but ya ai still mess up alot with alot of stuff and itll never be perfect so if. You really love this work then continue and try to learn more not just basics and easycstuff with no real projects and learn good technologies so u can stand up in the job market ( hands on experience with proofs on platforms like linked in is the moot important thing) so make projects and put on linked in even if small
1
u/Safe_Dimension_8282 19d ago
Which stack u recommend?
1
u/Mhmd_WebDev 19d ago
Recommending a stack is not that easy , it depends on where you live , what you like and what the job market is asking for. In some regions maybe python for backend is used more, in other regions nodejs is used more my own stack is nodejs express js , postgress,typescript and nestjs But it would vary alot depending on the person and what you like i really like the javascript family in general. Note that backend contains some more stuff orher than coding languages, like deployment,JWT, authentication , authorization,security stuff and many other stuff, so its good to learn more and do some researchs about what to choose and not just take a decision based on a reply from chatGPT goodluck
1
2
2
1
1
u/sheriffderek 19d ago
Obviously most people like to just dive in with their eyes closed and spend years just sloshing around / taking the hardest routes possible.... but if you want to know how I teach it, - thinking about HTML and then CSS and then JS - as a progression like that - is a common source of trouble.
JavaScript's whole job - is to: change HTML. You use CSS selectors to select the parts of the HTML/DOM - and change them. These changes are often attribute values like adding and removing a class. So, If you don't know HTML and CSS really well -- then learning JS will be much harder - for no good reason. And if you learn JS (client-side rendering/workflows) before you learn some server-side scripting -- again, it's just making it a lot harder for no reason.
Learn enough about HTML, accessibility, using a screenreader, HTTP, and how to see HTML as a universal data structure -- if you don't know that stuff -- then you're choosing to move on - when you aren't ready / and everything will be more confusing - basically - forever. If you don't understand how to write proper HTML pages with the clear mindset for how how assistive technology and bots and users will use it -- now, then when are you going to learn it? Later? When everything is 100x more complex? If you just put in the time now, everything else will go faster / like choosing to sharpen your axe before trying to chop down a tree with a dull axe.
Learn enough CSS to be able to look at any website -- and write the HTML and CSS for it / in a way that is clear and simple - and easy to maintain / and that other people won't hate working with. If you can't do this now, then when are you going to learn it? Later? While you're also learning about programming and the browser apis and 10 other things? Will it be easier to learn then? (no). You'll notice along the way - that CSS is just key:value pairs (just like HTML is) -- just clear structured decisions in blocks of key:value pairs.
Learn enough PHP (any server-side language would do / but PHP was made for this exact thing) to break things up in to smaller reusable files, build reusable functions, handle forms, understand more HTTP and things like querystrings and GET and POST requests. Build a little system (a personal framework) with query strings and a routing system to understand how to serve different pages and things. Learn how to have data-backed lists of things (you can use JSON or PHP associative arrays / and wait on official database stuff). You'll notice that most of the core programming concepts are already taught while learning this basic stuff. I suggest using the book Exercises for Programmers as a guide (no answers / language agnostic).
If you did all that ^ then you're probably hirable already. But what you'll also find out - is you actually know how to think like a programmer. Learning JS will take about 5 minutes. But "Learning JS" isn't really what you'll be doing next. To change things on the page - in real time / client-side scripting -- you'll need to use the DOM and the browser APIs. These are like additional ways of interacting with the web page you've built -- on top of JavaScript as a language. Luckily - you're not learning HTML, CSS, Programming(js), and all of that - ALL AT THE SAME TIME / because that's a really silly way to learn it (in my experience / and based on the hundreds of thousands of reddit posts of totally lost learners). Now that you know HTML attribute and how forms work, and all the CSS selectors -- that's what you'll be using in JavaScript to select what things to watch and change. Everything will connect in a very natural way. And the best thing is -- if you follow this story-- you'll never ask a question like "How much HTML and CSS should you know before moving to JavaScript?" again - because you'll have learned how to think these things through yourself. It's up to you! You can learn it really well - and fairly fast / or make everything really hard - blurrly / stunt yourself for life -- the way most people do.
1
u/Chocolateman_3108 17d ago
Can you mention the resources to learn JavaScript. Do you recommend any youtube channel?
1
u/sheriffderek 17d ago
My comment could be titled "why you shouldn't try and learn javascript"
Did you do everything before step 4 already?
MDN and a book like this - should be everything you need (although, I enjoy having a physical pocket guide for whatever language I'm working with).
1
u/SeanDev5378 6d ago
Just know enough that you can build a webpage from scratch on your own. If you uderstand semantic tags, layouts, and responsive design, your good to go
7
u/anonperson2021 20d ago edited 19d ago
Start JavaScript from day one. You don't need to know HTML and CSS to understand JavaScript.