BE ABLE TO:
HyperText Markup Language
CONTENT!
STRUCTURE!
Tell your neighbor in your own words the purpose of HTML
<p> The p tags plus this content is an element. </p>Opening tag
Closing tag
Element
<img src="../img/stuff.jpg" alt="img is a self-closing tag" >Common Self-closing Tags
Is this an element?
Additional information attached to an element.
"id" and "class" attributes are typically used to generate content or to act as a reference for other technologies like CSS & JS.
<img src="./resources/stuff.jpg" alt="Write something descriptive"><p class="lead">Content content content</p><h1 id="brand">Apple</h1><input type="password"
required
minlength="8"
>Now add appropriate attributes to 3 elements on cities.html
<ul>
<li>List item #1</li>
<li>List item #2</li>
<li>List item #3</li>
</ul>Nesting Elements
<nav>
<ul>
<li><a href="http://slides.com">Home</a></li>
<li><a href="http://google.com">About</a></li>
<li><a href="https://developer.mozilla.org">Contact</a></li>
</ul>
</nav><ul>
<li>List item #1</li>
<li>List item #2</li>
<li>List item #3</li>
</ul>Parents & Children
What are the siblings in this code snippet?
<nav>
<ul>
<li><a href="http://slides.com">Home</a></li>
<li><a href="http://google.com">About</a></li>
<li><a href="https://developer.mozilla.org">Contact</a></li>
</ul>
</nav>Talk to a different neighbor about the parents, children and siblings in this code snippet
Don't be like this guy.
Which of these is more intuitive?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Stuff and Things</title>
</head>
<body>
<div>
<h1>Big Header</h1>
</div>
<div>
<p>
<b>Middle Content!!</b>
</p>
</div>
<div>
<p>
© 2016
</p>
</div>
</body>
</html><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Stuff and Things</title>
</head>
<body>
<header>
<h1>Big Header</h1>
</header>
<main>
<p>
<strong>Middle Content!!</strong>
</p>
</main>
<footer>
<p>
© 2016
</p>
</footer>
</body>
</html>Why use semantic HTML?
Examples of structural semantic HTML
<header>
<nav>
<main>
<aside>
<section>
<footer>
<figure>
Examples of text markdown semantic HTML
<strong>
<em>
<figcaption>
<summary>
<date>
<time>
<details>
<pre>
Elements are usually either "block-level" elements or "inline" elements.
Block-level
occupies an entire row space of its parent element (container), thereby creating a "block."
Block-level elements may appear only within a <body> element.
Inline
occupies only the space bounded by the tags that define the inline element.