Skip to content

Instantly share code, notes, and snippets.

@aspencer8111
Last active December 13, 2017 17:41
Show Gist options
  • Save aspencer8111/7941683ac3b8b8584bd1c5e8fdedb7ff to your computer and use it in GitHub Desktop.
Save aspencer8111/7941683ac3b8b8584bd1c5e8fdedb7ff to your computer and use it in GitHub Desktop.
html-layout-sample
<!DOCTYPE html>
<html>
  <head>
    <title>My First Site</title>
  </head>
  <body>
    <header>This where the logo or top navigation would go!</header>
    <aside class="sidebar">
      <p>This is sidebar text!</p>
      <p>This is sidebar text!</p>
    </aside>
    <section>
      <p>Hello World!</p>
      <p>This is the main section</p>
    </section>
    <footer>This is where any content in the footer would go</footer>
  </body>
</html>
  1. Google the <br> (line break) tag. Send your mentor an explanation with your own words explaining why it should be used minimally if at all. A line break is used to break a line and not add a margin. The problem is is that they are often used interchangeably. The effect appears the same but the semantics are not. If the desire is to add a margin simply use "margin".
  2. What are the differences between the div, section, and aside tags? Send your answer to your mentor. div - A tag that is a container unit and encapsulates other page elements. This divides HTML elements into sections. They are used to group HTML elements together and apply CSS styles to them. section - A section is not a generic container element like a div. A section should be used if the element's contents should be listed in the document's outline. aside - A tag to define content aside from the content it is placed in.
  3. Why are there multiple kinds of <h> tags? Send your answer to your mentor. Having multiple headings allows you to define which are most important and which are less important.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment