I'm sorry for the questions.
That's what forums are for.
The way to constrain a width is to just set the width. Some html tags allow 'width' as an attribute, although I am pretty sure that it has been deprecated now in favor of CSS. You would do something like the following:
The rest of your code would then go between the div tags.
As far as how CSS fits into everything, the easiest way to explain is to use an analogy. HTML is the building block or structure of a web page. If you were a carpenter, you could think of the HTML as the bare framework of the house. CSS is the instrument by which one decorates that framework. OR to draw another analogy, HTML builds the canvas, and CSS provides the brushes and colors.