HTML Introduction to HTML and CSS Getting Familiar with HTML and CSS Building Web Pages with HTML and CSS

Amandeep Pasricha
Amandeep Pasricha
Front End Web Development Techdegree Student 11,008 Points

What is the purpose of the big tags and the mini tags?

In the HTML file, the common organization you see is a big tag, and within it theres little tags inside of it. Do the big tags (ex. the header tag, main tag, etc) denote a specific area on the webpage, while the little tags determine the structures that will be present within that area? When I say structure, I mean whether the text will appear as a paragraph or header?

Thanks

1 Answer

Steven Parker
Steven Parker
170,248 Points

All HTML tags are primarily for defining structure, though some have common defaults that affect how their contents are displayed. The final appearance is a matter of styling applied by the CSS code.

For structural purposes, tags with designated semantic purposes should be used. For examples, a paragraph should be in a <p>, and a header might be in an <h1>. Indirectly related information might be enclosed in an <aside>. But how these look on the page can be changed with CSS.

HTML is a hierarchy, so you can have containers inside other containers. The structure is very flexible and up to you, though there are a few common "best practices" that you will learn about. There really aren't any "big tags" yet a few have special rules. For example, a "main" tag is optional, but only one should be visible on the page at a time.

I hope that answers your question. Happy coding!