Hyper Text Markup Language
.html
extension
, an "end tag"
, some content in between them, and multiple types of attributes.
<tagname attribute="value">
content
</tagname>
<a href="http://www.google.com">
Google
</a>
<a>
tag stands for "anchor," the href
attribute stands for "hyper-reference," and the value, a URL, is assigned to the attribute of the anchor tag.
<html>
<!doctype html>
<html>
</html>
doctype
isn't an actual tag, but it needs to be at start at every HTML page to tell browser which version of HTML you're using (HTML5 here).
html
is the root of the page.
<head>
element<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>The title of your page goes here</title>
</head>
</html>
<head>
contains "meta" information about the page: information that the browser needs before rendering. Note: It also includes <link>
tags to your CSS stylesheets.
<meta>
tags.
<body>
Element<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Title of your page goes here</title>
</head>
<body>
Bulk of your content here.
</body>
</html>
html
in your index.html
file. Then, save it, commit it, and push the committed changes to your repo on Github.
<body>
/* questions? */
inline
elements, since block
elements have width and height properties that you can change.
Inline
elements have a width, but is contingent on the size of the inline object itself.
<div>
; <article>
; <section>
; <h1>
, <h2>
, <h3>
...; <p>
, etc.
<img>
, <b>
, <em>
<img>
element is actually an inline-block element, so you can modify the dimensional and position properties.
float: left;
position: absolute;
position: fixed;
See the Pen HTML: Block and Inline Elements by Chris Lindgren (@lndgrn) on CodePen.
/* questions? */
<html>
(Navigate back to your index.html
file.)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>My DataStory</title>
</head>
<body>
<article id="datastory">
<section id="personal-digital">
</section>
<section id="social-digital">
</section>
</article>
<footer id="resources">
</footer>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>My DataStory</title>
</head>
<body>
<article id="datastory">
<section id="personal-digital">
<h1>Personal Digital Data</h1>
<p>Here is a placeholder paragraph.</p>
</section>
<section id="social-digital">
<h1>Social Digital Data</h1>
<p>Here is a placeholder paragraph.</p>
</section>
</article>
<footer id="resources">
<ul>
<li>Resource 1</li>
<li>Resource 2</li>
</ul>
</footer>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>My DataStory</title>
</head>
<body>
<article id="datastory">
<section id="personal-digital">
<h1>Personal Digital Data</h1>
<p>
Here is a placeholder paragraph, and I should <em>emphasize
something</em>.
</p>
</section>
<section id="social-digital">
<h1>Social Digital Data</h1>
<p>
Here is a placeholder paragraph.
</p>
</section>
</article>
<footer id="resources">
<ul>
<li>
<a href="http://www.resourceurl.info/useful-info.html" target="_blank">
Resource 1</a>
</li>
<li>Resource 2</li>
</ul>
</footer>
</body>
</html>
<a>
Links<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>My DataStory</title>
</head>
<body>
<article id="datastory">
<section id="personal-digital">
<h1>Personal Digital Data</h1>
<p>
Here is a placeholder paragraph, and I should <em>emphasize
something</em>.
</p>
</section>
<section id="social-digital">
<h1>Social Digital Data</h1>
<p>
Here is a placeholder paragraph. Here is an example of an internal
link, where I reference <a href="#personal-data">something else</a>
on the page by using an ID attribute to navigate to that particular
element located on the page.
</p>
</section>
</article>
<footer id="resources">
<ul>
<li>
<a href="http://www.resourceurl.info/useful-info.html" target="_blank">
Resource 1</a>
</li>
<li>Resource 2</li>
</ul>
</footer>
</body>
</html>
<img>
Element<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>My DataStory</title>
</head>
<body>
<article id="datastory">
<section id="personal-digital">
<h1>Personal Digital Data</h1>
<!-- What kind of element is an img: block or inline? -->
<img src="http://via.placeholder.com/350x150" alt="A placeholder image." />
<p>
Here is a placeholder paragraph, and I should <em>emphasize</em>.
</p>
</section>
<section id="social-digital">
<h1>Social Digital Data</h1>
<p>
Here is a placeholder paragraph.
</p>
</section>
</article>
<footer id="resources">
<ul>
<li>
<a href="http://www.resourceurl.info/useful-info.html" target="_blank">
Resource 1</a>
</li>
<li>Resource 2</li>
</ul>
</footer>
</body>
</html>
/* Recap with Your Browser's Inspect Element Tool */