Div Tags

Tags can contain tags and this is how pages are put together. The <div> tag defines a division or a section in an HTML document. It is used as a container for HTML elements:

<div id="intro">
  <h1>Welcome to the site</h1>
  <div class="image-wrapper">
    <img class="image-large" src="team.jpg" />
    Welcome to our website. You can see the team above, and
    <a href="/team">find out more about them here.</a>

Lines of code can be indented to make it more astetic and readable by a coder but the browser cares not and ignores multiple spaces. Clear code is easier to debug and edit

HTML and CSS describe the content and appearance of a page, as well as links to other resources.

  • CSS Basics
    • In HTML a class is an attribute that can be set on an elements Div Tags. For example <p class='intro lead'>This is the intro text.</p> would point to the rule p and also p intro and p lead. You can use anything you like as a class name and can use numerous class’s