Semantic HTML Tags | HTML5 Semantic Elements Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.ย. 2024

ความคิดเห็น • 68

  • @DaveGrayTeachesCode
    @DaveGrayTeachesCode  2 ปีที่แล้ว +12

    Semantic HTML is crucial for the foundation of your websites and web apps. Providing semantics in your HTML - that is, conveying meaning with your structure - helps the browser understand the organizational structure of your content. This also greatly helps with assistive technology such as screen readers - not everyone browsers the web with a mouse. Develop your website with accessibility in mind and a proper structure by applying semantic HTML. Just getting started with HTML? Go to the start of the HTML for Beginners playlist here: th-cam.com/play/PL0Zuz27SZ-6OlAwitnFUubtE93DO-l0vu.html

  • @cagdasbalkay9050
    @cagdasbalkay9050 2 ปีที่แล้ว +13

    This is a best video about "Semantic Elements" that I've ever seen. Thank you so much , sir.

  • @javabeanz8549
    @javabeanz8549 ปีที่แล้ว +4

    Near the end of the video, you mention checking the Outline. You can check the box for Outline when you use the Validator, and it can display the outline along with the results. Also in the Validator, you can have it show the entire HTML, which can be handy when troubleshooting errors.

  • @angelsv
    @angelsv 2 ปีที่แล้ว +8

    I was looking for an HTML course that actually teaches the technical part and explains the reasoning of why we do certain things. Or why we use a certain TAG on an Element. I think absorbing this knowledge since the beginning of your learning journey is without doubt a key part at making decisions in any field in a later day.
    Furthermore, I found very important the topic discussed at minute 19:12 as I just came back from another tutorial, wasted almost 2 hours and the instructor was using and giving the class name "container" to wrap the whole content on it.
    I'll definitely will subscribe and start from scratch. I want to switch career at this moment and Front End development it's something I would enjoy doing.
    With regards,

  • @cocoscacao6102
    @cocoscacao6102 ปีที่แล้ว +7

    This is an awfully underrated subject that almost no one talks about.

  • @aragorn2753
    @aragorn2753 ปีที่แล้ว +4

    Definitly one of the best teachers out there ,
    Thanks a lot dave your channel is a gem !!

  • @xpresscomedy9959
    @xpresscomedy9959 ปีที่แล้ว +2

    I had no choice but to subscribe
    This well explained thanks.

  • @garikmelqonyan6011
    @garikmelqonyan6011 ปีที่แล้ว +1

    Thanks for this cool tutorial, Dave: descriptive and well-detailed explanation.

  • @JavierViramontesR
    @JavierViramontesR 7 หลายเดือนก่อน

    That first looked good.

  • @Billy-ku2vm
    @Billy-ku2vm 5 หลายเดือนก่อน

    Great start for semantics!

  • @Valdaur
    @Valdaur ปีที่แล้ว +1

    I still see people using the element a lot, and it does bother me! I inspected the source code of a certification provider that offer web development certifications and was surprised to see them use liberal amounts of elements and IDs more than classes to style their sections. From what I have read, the only place to use a element is for things like wrappers and containers. At first I was using sections for these because I felt like I needed to ditch using divs altogether, but they still do have their uses; just like spans actually!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +1

      Good research! Yes, a div is usually the last thing I reach for, but when no other semantic meaning applies, div it is. 😀

  • @Valdaur
    @Valdaur ปีที่แล้ว +1

    Regarding the elements, would it make sense to keep the elements on the page between different topic areas but have them invisible. You mentioned that you would use CSS instead to create borders between elements, but is it worth still keeping the elements for the semantic meaning they provide?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +2

      Good question! There could be varying opinions on this, but here's my take: If you have separate article or section elements and each article has its own subheading (h2 or h3, etc), the semantic article / section element and heading are enough to indicate it contains a new topic. However, for example, if you are inside the same section element, you may want those hr (themematic breaks) elements between new topics even if a heading is used. There is no "absolute" correct way here but I lean towards providing more guidance instead of less.

  • @syedRasheed-yu2di
    @syedRasheed-yu2di 11 หลายเดือนก่อน

    very clear explanation sir!!!!!!!

  • @fairytail6896
    @fairytail6896 8 หลายเดือนก่อน

    Thank you very much for teaching me the basics of html. Planning to watch all of your videos related to web development. Great job!!!

  • @YannMetalhead
    @YannMetalhead 3 หลายเดือนก่อน

    Good course, thank you!

  • @ahmad-murery
    @ahmad-murery 2 ปีที่แล้ว +2

    Using semantic elements is a must-have skill for all type of developers,
    Semantic elements describe your content logically while none sematic ones describe it politically (no offense) 😁
    What about the address element? it looks semantic but must be used with care as it refers to contact information instead of an address (as mentioned on MDN)
    Thanks Dave, that was a good video to start 2022 which I hope it'll be as semantic as HTML5

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว +5

      Absolutely, Ahmad. I try to emphasize semantic elements and keep accessibility in mind as I create any project. As you said, it's a must-have skill. The address element allows for all types of contact information. It can be contain an email and/or phone number or it can contain a physical address or other contact information. A good element to keep in mind for those "Contact Us" pages! 💯

  • @belginefe1838
    @belginefe1838 2 ปีที่แล้ว +1

    Awasome tutorial again👍

  • @TeomunMete
    @TeomunMete 8 หลายเดือนก่อน

    Thanks

  • @moonlightCR7
    @moonlightCR7 ปีที่แล้ว

    Thanks Dave, you rock man!

  • @sammclaren6965
    @sammclaren6965 ปีที่แล้ว

    You did a great job! Thank you very much!

  • @CTILET
    @CTILET 2 ปีที่แล้ว +1

    Thank you for your work!

  • @mahmodsamir5110
    @mahmodsamir5110 ปีที่แล้ว

    Thank you very much for this effort

  • @amosn6524
    @amosn6524 ปีที่แล้ว

    Great tutorial. Thank you :)

  • @sayedalimousavi6091
    @sayedalimousavi6091 2 ปีที่แล้ว

    Subscribed and liked, in response to your effort and time for us. Thanks alot.

  • @iambrijeshtoo
    @iambrijeshtoo ปีที่แล้ว

    Thank you!

  • @talat9553
    @talat9553 2 ปีที่แล้ว +1

    can you please let us know about your VSC color theme? btw thank you for the great video

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว +1

      You're welcome! GitHub theme 🚀

    • @talat9553
      @talat9553 2 ปีที่แล้ว

      @@DaveGrayTeachesCode thank you very much Dave, looking forward for your more Angular videos

  • @stephenhammond1745
    @stephenhammond1745 ปีที่แล้ว

    For some reason I can't get the outliner to work in Chrome. When I click on it it just tells me that it can't read data from this site (meaning my page). I don't normally use Chrome anyway so I found an outliner addin for FireFox called HeadingsMap that works the same way.

  • @GabrielAraujo-xy2qc
    @GabrielAraujo-xy2qc ปีที่แล้ว

    Awesome! thx

  • @lilcurtie
    @lilcurtie ปีที่แล้ว

    I love your video. They have helped me out a lot. I'm still new, and I'm trying to become a full-stack engineer. I have been looking around, and I keep seeing that you only should use one id and I have 4 of them in my article, so it seems like this and I have four pieces is this okay, or should I change to a class and how every time I try my nav bar don't work.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      Each id should be unique on a page. If you want to use the same identifier for more than one, a class is the way to go.

    • @lilcurtie
      @lilcurtie ปีที่แล้ว

      Okay, thank you. I'm trying to build my portfolio, and I'm stuck

  • @SamChaneyProductions
    @SamChaneyProductions ปีที่แล้ว

    Is it the Live Server extension (with the purple radio waves logo) or the Live Server Preview (with the orange HTML doc logo)?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      I use the one from Ritwick Dey that has the purple radio waves (but they look pink to me :)

  • @fabrice9848
    @fabrice9848 2 ปีที่แล้ว +1

    I prefer Semantic HTML viewer to HTML5 Outliner.

  • @80Vikram
    @80Vikram 2 ปีที่แล้ว

    Can you please clarify which validator you're talking about ? Is it some plugin with VS Code which does semantic HTML validation ?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว

      Hi JS, can you provide a timestamp to the spot you are talking about in the video? Thanks!

    • @Valdaur
      @Valdaur ปีที่แล้ว

      I know I'm 7 months late to respond, but are you referring to the W3C HTML Validator? If so It's linked in the video description.

  • @NedumEze
    @NedumEze 2 ปีที่แล้ว +1

    Hi Gray. Thanks. You shocked me! Am a user of divs for most of my markup! That a page can have no divs! Shocking. Speaks work for me to begin refactoring.
    Still, I have a terrible Javascript challenge.
    You've been my Javascript Tutor too.
    Would you help me sort it?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว

      Thank you! Yes, avoid divs when you can use semantics. I'll keep making videos to help 💯

  • @evanmico
    @evanmico 8 หลายเดือนก่อน

    it seems that a lot of these semantic html elements provide default formatting. This sounds like a nightmare from the CSS perspective later on. How would we strip them of the default formatting if we know we don't want it?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  8 หลายเดือนก่อน

      Look into a CSS reset. I do cover that in my CSS course.

    • @evanmico
      @evanmico 8 หลายเดือนก่อน

      ​@@DaveGrayTeachesCode14:53 I thought the reset only handled stuff like padding, margin, and box-sizing. At the timestamp you finish the element and on the page a little arrow appears to drop-down the menu. How would we style that arrow? Remove the arrow? Etc. And this question goes out to all the default formatting of various html elements as a whole.

  • @rohanshingmode5918
    @rohanshingmode5918 2 ปีที่แล้ว

    How this auto formatting your code after you save the code ??
    What setting for that?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว +1

      It is a VS Code setting - details here: stackoverflow.com/questions/39494277/how-do-you-format-code-on-save-in-vs-code

    • @rohanshingmode5918
      @rohanshingmode5918 2 ปีที่แล้ว

      @@DaveGrayTeachesCode Thank you Sir ..
      Your content is really helpful for everyone 👍
      Best teacher as best mentor also 🔥🔥

  • @felicialeann547
    @felicialeann547 2 ปีที่แล้ว

    I noticed that in all of your videos, things auto reformat for you, and they do not do that for me. I have to highlight entire regions and tab them in.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว +1

      Several VS Code extensions exist for this, but VS Code also has some built-in settings to help you. This post may help you: www.digitalocean.com/community/tutorials/how-to-format-code-with-prettier-in-visual-studio-code

    • @felicialeann547
      @felicialeann547 2 ปีที่แล้ว

      @@DaveGrayTeachesCode Thanks! I'll definitely read this and some other stuff. I really appreciate your videos. I'm a little bit old fashioned in that I took out a notebook and a pencil and hand wrote the code to figure out where things should be tabbed in and then fixed it in my index file lol I have prettier installed. I followed every little instruction and step in your videos. but visual studio isn't auto reformatting anything for me. So I'm really paying attention to where everything should be lined up.