Getting Started

If you've never learned HTML before, I'd suggest getting started by taking GitHub's Learning Lab Introduction to HTML

<!doctype HTML>
  <h1>The Brown Bear</h1>
  <div id="introduction">
    <h2>About Brown Bears</h2>
    <p>The brown bear (<em>Ursus arctos</em>) is native to parts of northern Eurasia and North America. Its conservation status is currently <strong>Least Concern</strong>.<br /><br /> There are many subspecies within the brown bear species, including the Atlas bear and the Himalayan brown bear.</p>
      <li>Nelsoni (extinct)</li>
    <p>Brown bears are not always completely brown. Some can be reddish or yellowish. They have very large, curved claws and huge paws. Male brown bears are often 30% larger than female brown bears. They can range from 5 feet to 9 feet from head to toe.</p>
  <div id="habitat">
    <h3>Countries with Large Brown Bear Populations</h3>
      <li>United States</li>
    <h3>Countries with Small Brown Bear Populations</h3>
    <p>Some countries with smaller brown bear populations include Armenia, Belarus, Bulgaria, China, Finland, France, Greece, India, Japan, Nepal, Poland, Romania, Slovenia, Turkmenistan, and Uzbekistan.</p>
  <div id="media">
    <img src="" alt="A Brown Bear"/>
        <video src="" controls>Video not supported</video>

Character Entities

Imagine the following situation: you're writing an HTML page, and you want to type the expression <div>. Perhaps that's the exact situation I'm in as I write this page...

<!-- See why this won't work? -->
  A section on <div>

Sometimes you want to specify a character that has a special meaning, such as > in the example above. To prevent errors from occurring when rendering your page, HTML gives you the option to specify character entities by a reference code.

Code Point Numbers

You can refer to any character with its corresponding code point numbers. I've included some examples for referencing some ASCII characters by their code points, but you can refer to any character in Unicode's UTF-8 Universal Character Set (UCS) by specifying its corresponding code points.

Character Entity References

As of HTML5, there is support for using character entity references as an alternative to code point numbers. A character entity reference, when stated, replaces itself with the character you are trying to specify.

W3C's character entity reference chart is a good place to look to quickly find a particular character entity.


Writing the $ character (ASCII Code Point #36):

If you write any of these three sequences somewhere in your HTML file, it will will never appear on the page, instead being replaced by the $ character.


Char Decimal Code Point Hex Code Point Character Entity
! &#33; &#x21; &excl;
" &#34; &#x22; &quot;
# &#35; &#x23; &num;
$ &#36; &#x24; &dollar;
% &#37; &#x25; &percnt;
& &#38; &#x26; &amp;
' &#39; &#x27; &apos;
( &#40; &#x28; &lpar;
) &#41; &#x29; &rpar;
* &#42; &#x2a; &ast;
+ &#43; &#x2b; &plus;
, &#44; &#x2c; &comma;
. &#46; &#x2e; &period;
/ &#47; &#x2f; &sol;
: &#58; &#x3a; &colon;
; &#59; &#x3b; &semi;
< &#60; &#x3c; &lt;
= &#61; &#x3d; &equals;
> &#62; &#x3e; &gt;
? &#63; &#x3f; &quest;
@ &#64; &#x40; &commat;
[ &#91; &#x5b; &lbrack;
\ &#92; &#x5c; &bsol;
] &#93; &#x5d; &rbrack;
^ &#94; &#x5e; &Hat;
_ &#95; &#x5f; &lowbar;
` &#96; &#x60; &grave;
{ &#123; &#x7b; &lbrace;
| &#124; &#x7c; &vert;
} &#125; &#x7d; &rbrace;
  <link rel="stylesheet" type="text/css" href="style.css" title="style">
  <meta property="og:title" content="">
  <meta property="og:image" content="">

Open Graph

If you're trying to create rich previews for your web page, Facebook's Open Graph protocol is the de-facto standard for how to structure your page's metadata.

For instance, Apple's iMessage allows you to have an embedded image for your website when you send iMessages. Specify the source image as the value of the og:image attribute within a <meta> tag somewhere in your web page's head.

The website provides a helpful playground to practice adding the metadata.

For more advanced debugging, check out Google's Structured Data Testing Tool

!Teddy Bear


Anatomy of an HTML element

   [opening tag]          [closing tag] 
┌───────┴─────────┐            ┌┴─┐
<p class="example">Hello world!</p>
   └─┬─┘ └───┬───┘ └────┬─────┘
[attribute] [value] [enclosed text content]

Tag Attributes


The title attribute determines what text (if any) is displayed when a user hovers over an element on your page

Search Engine Optimization

I've heard Backlinko's guide to SEO is the most comprehensive, but I'd also check out Google's Search Engine Optimization (SEO) starter guide

HTML Style Guide

Taking some notes on the Google developer documentation style guide, leaving them here.

Their section on Command-line terminology shows a great example of how to write a command

Google wrote a great example of how to format the usage of a command in documentation, check it out.

Responsive Design

Responsively designed sites are those that respond to the needs and capabilities of the device they are viewed on.

Google wrote a great article about the basics of responsive web design

In order to properly set the viewport, you'll need to prevent mobile browsers from rendering the page at a desktop screen width. To do so, add this <meta> tag to the HTML header

<meta name="viewport" content="width=device-width, initial-scale=1">