The HTML Structural Ideology

The way HTML is written isn't the way you'd normally expect to see "programming" written, because in all honestly calling it "programming" is generous. If you remove the content and any Styles or Scripting added to a page by other languages, what you'd be left with are called "HTML Tags" and look <like> </this>. For example, if you wanted to add a paragraph of text to a HTML page, you'd start with an "opening tag" like this: <p> Then you would add all the text you wanted to include,and at the end of your paragraph add a "closing tag" like this: </p>

The main purpose of these tags is to define what kind of content is in a section so the Web Browser can apply whatever styles or scripts have been defined for that tag. There are a handful of baked-in tags like <p> or <em> but as the possible styling and scripting options started to grow, it became clear that these tags are never going to be able to keep up. In order to get around this, most developers mostly use the <div> tag to section out content (because it has very little styling applied to it by default) and then define a value called a "class" for the tag. This "class" can then be called in CSS to apply whatever styling you want to every element on your page that shares the same class name. They're written like this: <div class="className"> and we'll talk more about them in the CSS section, because they aren't used for much else in HTML.

Previous
Previous

Early HTML

Next
Next

HTML Tables