Check out a free preview of the full Complete Intro to Web Development, v3 course
The "CSS Project Q&A" Lesson is part of the full, Complete Intro to Web Development, v3 course featured in this preview video. Here's what you'd learn in this lesson:
Brian answers students' questions regarding the reasoning being using div tags and not paragraph tags and why a nav tag was used instead of a header tag. A brief discussion about linking external style sheets is also provided in this segment.
Transcript from the "CSS Project Q&A" Lesson
[00:00:00]
>> Any questions on my implementation of how it is? Anything I do that didn't make sense? Yeah, sure.
>> I noticed that you use a lot of div, and that's probably okay but I was thinking I did paragraphs in a lot of mine.
>> Yeah, so-
>> Cuz I normally think of div as containers.
[00:00:24]
>> It's a super valid question and a valid point. So for example, let's see if I can find one more I just kind of yellowed it. Like here, this div right here, where it's just containing text. There's a super valid reason that you would say this is a paragraph, right?
[00:00:43]
Cuz it's just text. So I'll give you two sides of that. I typically use divs if I'm actually putting an actual paragraph of text, right? Cuz actually they are going to be sentences to read. That's a personal choice and it's not correct, it's not incorrect. I do wanna broaden your definition of what divs can be.
[00:01:05]
They can be containers, they certainly are containers, that part of the definition absolutely correct. But they're just amorphous. They are whatever you define them to be. So in this particular case, I define them to be item quantity. It's more defined what the class is rather than what the div is.
[00:01:21]
IIt's a blob and you can shape it into whatever you want it to be. But personal preference at that point. If you feel like paragraphs are more fitting there, I'm super okay with that. I'm happy that you're forming opinions about it or have opinions about it. How do we do?
[00:01:37]
Okay? Did we feel okay about this? Was it hard? This probably took me at least an hour to do and I've done this thing a trillion times my career. So I did not knock this out very quickly. So if it took you a while to do it, you're okay.
[00:01:55]
I don't know if I'm gonna call myself good company, but you're at least in my company. Okay. Cool. So one thing I think I'm not positive I mentioned in previously, but the way you link a stylesheet in here. We don't wanna do it in here, we wanna look at the other one.
[00:02:24]
And here. So here in the head, I just have this link here, out to style sheet, right? This is how you link to external style sheets. Same thing with an href and all that kinda stuff. Yeah, Mark.
>> You used the nav for the logo? Wouldn't it be more meaningful to use the header tag instead?
[00:02:52]
>> Yeah, that's actually a really good point. So astutely calling out that I call this a nav. Just nothing really navigating about this. Better semantic tag for this would be header. Because that's more accurately what it is. That is somewhat better, a somewhat more important distinction just because a screen reader is gonna look for a navigation bar to define where it can send its user next..
[00:03:34]
There's nowhere to navigate in here. It's more accurately just a header, that's at the top of the page. So yeah, good call Cool. So we are done with HTML and CSS. Hopefully feel pretty good about those. You can get jobs doing just HTML and CSS, there's a lot of people that have WordPress sites that just need styling and design.
[00:04:15]
Beyond that actually know a decent amount of designers these days that they don't even work in figma or things like that anymore. They do all of their designs directly into the HTML and CSS, they don't end up writing very much JavaScript, but they end up doing their designing process directly in HTML and CSS.
[00:04:33]
So for designers this is actually super useful we've gone through so far. Not every lots of people still use stigma by the way, or sketch or anything like that. But yeah, I think it's pretty cool.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops