When we code in HTML, CSS, JS, etc. we are communicating to the browser. That’s what we do as web designers. We are telling the browser how to display content. The browser understands many different languages. It understands, HTML, CSS, JavaSript, XML, SVG and others. Each of those languages have their own syntax. For the browser to interpret the languages correctly we have to tell the browser which language we are using.
For example, when we link an external stylesheet, the browser is expecting to see only CSS characters in the .css file. We link it as
<link rel="stylesheet" type="text/css" href="someFileName.css">. We are telling the browser that we are linking a file that has a relationship to the HTML file as a stylesheet and is using text characters that should be interpreted as CSS code. The browser is expecting something very specific. If you give it something other than what it is expecting, you will get errors.
The > character does exist in CSS, but it doesn’t mean the same thing as it does in HTML.
There is no <container> tag. When we use the term container, we’re talking about function. The header tag “contains” markup that goes at the top of the page. The <header> tag IS a container tag.
A div tag is a very general container. It stands for division. At one time, it was all we had so we used it exclusively and one page could have dozens of div tags in them. It got pretty confusing. In order to distinguish one div tag from another, we gave them id attributes.
<div id="header">Some content including a logo, page heading, and navigation also in a div tag</div>
<div id="aside">Some content</div>
<div id="article">Some content</div>
With the new version of HTML, we have additional tags that act as containers that have more meaning (semantic); header, section, article, aside, nav, footer, etc. In general, if there is a tag that makes more sense to use, i.e. a nav tag contains navigation code, then use it. If you need to put code in a container, and there is not a semantic tag that does the job, then use the div tag.