Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Don't We Just Confuse Ourselves and Increase The Complexity Of Our Code?

IMMaximum

Coder
So I am currently taking a course to learn HTML Code, then after that I will move on to CSS Code, and then finally JavaScript Code! But I have a question, so when we use the <div> and </div> tags, doesn't that just increase how complex our code is? I saw someone else mention this before, but I also wanted to check it here. Since the div tags don't affect the overall look of the code, then don't they just make it more and more confusing? Also, while I am talking on this, isn't it the same for the <body> and </body> tags? Since they don't affect the overall look of the code at the end? I really want to figure this out, so that it helps me in learning HTML coding! Please help me with this!
 
I think it actually makes the code more organised. Any visible content goes in the body tag, and any meta elements go in the head tag.

The use of opening and closing tags allows a sort of hierarchy, where children elements can be within other parent elements. Div tags are often used for containing and positioning other elements.

The use of different elements is mostly for semantics. Each element has a different purpose. Take a look at Semantic HTML:
 

Buy us a coffee!

Back
Top Bottom