Jameo Jameo - 2 years ago 114
HTML Question

Explain what a <div> tag is to a non-programmer

So my brother is home for the holidays, and he is trying to learn HTML & Javascript. I've had some success explaining to him many of the concepts related to this. Most of the tags are pretty self explanatory, but I've struggled with describing a div tag.

To be honest, I never really got a good description for myself, just through experience I know when to use one.

A good answer will not need to include the definition of "block element" or any other technical jargon, although you can assume some basic knowledge of some HTML tags

Answer Source

For some reason the purpose or logic around the <div> </div> tags, made sense to me looking at cloth clips, and the reason it is because:

  • Cloth clips are usually or almost always are applied Two for each type of cloth. ( <div> </div> )
  • One can not work without the other, otherwise the cloth will fall. ex: <div> alone can not work.
  • The purpose of them is so that, they can hold a block of code ex: (a cloth in this case)
  • And control the structure, space, width, layout of a given object as per your desire.

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download