Hyper Text Markup Language
Tags == declarative "commands" for browsers
.html extension
4814-html-practice folder in your typical local folder
index.html file in the root folder
index.html file and check your default indentation rule
<!doctype html>
<html>
<head>
<title>Title of page here</title>
<meta description="Metadata and resources go in the head." />
</head>
<body>
<h1>Rendered page content here.</h1>
</body>
</html>
, you can include attributes.
id and class
id: unique identifier for an element; 1 per pageclass: identifier for a class of shared styled elements; helps select many across site pageshref for a or link
<tagname attribute="value">
content
</tagname>
<html lang="en">scope == the entire page</html>
<span lang="en">scope == wrapped inline text</span>
<span lang="fr">portée == texte en ligne encapsulé</span>
<a href="http://www.google.com" target="_blank" rel="noopenner">
Google
</a>
<section id="about" class="f-didot">
<h2>About Me</h2>
</section>
<html><!doctype html>
<html lang="en">
</html>
doctype:
doctype).
html tag.
html: the root of the page.
<head> element<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- declaration that maintains user zooming -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>My Practice Site</title>
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="assets/css/style.css">
</head>
</html>
<meta /> tags self-close.
<link> tags that tell the browser WHERE to locate CSS
stylesheets.
<body> Element<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- declaration that maintains user zooming -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>My Practice Site</title>
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="assets/css/style.css">
</head>
<body>
Content goes in here.
</body>
</html>
/* questions? */<body> Tags
Block elements act like "building blocks," so they start on new line in the document.
block elements can be nested to create parent-child relationships.
block elements.
Inline elements can begin within a line and do not by default start a new line.
inline element's width only extends as far as it is defined by its tags.
<html>Let's practice writing and structuring some more HTML elements!
Write 2 examples of a meaningful set of parent-child nested relationships.
2-html-fave-things