2025 HTML Cheatsheet | SheCodes

SheCodes HTML Cheatsheet

SheCodes HTML cheatsheet

About this website and SheCodes
This website was built using technologies taught in SheCodes Coding Workshops including HTML, CSS, JavaScript, React, GitHub, Bootstrap and APIs. SheCodes teaches coding skills to busy women 👩‍💻

General

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>SheCodes</title>
</head>
<body>
  
</body>
</html>

Comment

<!-- this is a comment -->

Text Tags

Headings

<h1>
  SheCodes
</h1>
<h2>
  SheCodes
</h2>
<h3>
  SheCodes
</h3>
<h4>
  SheCodes
</h4>
<h5>
  SheCodes
</h5>
<h6>
  SheCodes
</h6>

Paragraph

<p>
  SheCodes teaches busy women how to code.
</p>
<ul>
  <li>
    SheCodes Basics
  </li>
  <li>
    SheCodes Plus
  </li>
  <li>
    SheCodes Responsive
  </li>
  <li>
    SheCodes React
  </li>
</ul>

Ordered List

<ol>
  <li>
    SheCodes Basics
  </li>
  <li>
    SheCodes Plus
  </li>
  <li>
    SheCodes Responsive
  </li>
  <li>
    SheCodes React
  </li>
</ol>

Nested lists

<ul>
  <li>SheCodes Basics</li>
  <li>SheCodes Plus</li>
  <li>
    <strong>SheCodes Pro</strong>
    <br />
    <ul>
      <li>SheCodes Basics</li>
      <li>SheCodes Plus</li>
      <li>SheCodes Responsive</li>
      <li>SheCodes React</li>
    </ul>
  </li>
</ul>

Link

<a href="https://www.shecodes.io/">SheCodes</a>
<a href="https://www.shecodes.io/" target="_blank">SheCodes</a>
<a href="https://www.shecodes.io/" target="_blank" title="SheCodes Website">SheCodes</a>

Mailto link

<a href="mailto:team@shecodes.io">Send us an email</a>

Anchor link

<a href="#important">
  Jump to the heading below
</a>

<div id="important">
  This is a note
</div>

Separators

Line Break

SheCodes offers coding workshops <br />
to busy women <br />
Sign up today
SheCodes offers coding workshops
<hr />
to busy women
<hr />
Sign up today

Attributes

Classes

<a href="https://www.shecodes.io/" class="website-url">SheCodes</a>
<div class="header important">SheCodes Workshops</div>

Ids

<a href="https://www.shecodes.io/" id="website-link">SheCodes</a>

Containers

Div

<div>SheCodes</div>
<div class="coding-workshop">SheCodes</div>

Span

<span>SheCodes</span>
<span class="best-workshop">SheCodes</span>

Header

<header class="page-header">
    <h1>SheCodes Workshops</h1>
</header>

Footer

 <footer>
        <p>© SheCodes</p>
    </footer>

Section

<section class="workshop-information">
    <h2>SheCodes Pro</h2>
    <p>SheCodes Pro includes everything you need to become a professional developer...</p>
</section>

Media Tags

Image

<img src="https://s3.amazonaws.com/shecodesio-production/uploads/files/000/083/182/original/cat.png?1685030491" />
<img src="https://s3.amazonaws.com/shecodesio-production/uploads/files/000/083/182/original/cat.png?1685030491" alt="Image description" />
<img src="https://s3.amazonaws.com/shecodesio-production/uploads/files/000/083/182/original/cat.png?1685030491" alt="Image description" width="400" />

Video

<video src="https://video-url"></video>
<video src="https://video-url" controls></video>

Audio

<audio controls src="https://url-to-audio-file.mp3"></audio>

Form Tags

Form

<form action="/submit">
    <label for="name">Enter your name: </label>
    <input type="text" placeholder="Your name" name="name" id="name" required />
    <label for="email">Enter your email: </label>
    <input type="email" placeholder="Your email" name="email" id="email" required />
    <input type="submit" value="Subscribe!" />
</form>

Inputs

<label for="name">Name (4 to 8 characters):</label>
<input type="text" id="name" />

Button

<button class="signup-button">
  Sign up now
</button>

Radio inputs

<label>What pets do you have?</label>
<input type="radio" name="pet" id="cats" value="cats" checked />
<label for="cats">Cats</label>
<input type="radio" name="pet" id="dogs" value="dogs" />
<label for="dogs">Dogs</label>
<input type="radio" name="pet" id="frogs" value="frogs" />
<label for="frogs">Frogs</label>
<label>What pets do you have?</label>
      <div>
        <input type="checkbox" name="pets" id="cats" value="cats" />
        <label for="cats">Cats</label>
      </div>
      <div>
        <input type="checkbox" name="pets" id="dogs" value="dogs" />
        <label for="dogs">Dogs</label>
      </div>
      <div>
        <input type="checkbox" name="pets" id="frogs" value="frogs" />
        <label for="frogs">Frogs</label>
      </div>
 <label for="countries">Which country would you like to travel to?</label>
    <select id="countries">
      <option value="">Select a country</option>
      <option value="france">France</option>
      <option value="italy">Italy</option>
      <option value="usa">USA</option>
      <option value="brazil">Brazil</option>
      <option value="japan">Japan</option>
    </select>

Styling tags

Strong

<strong>SheCodes Workshops</strong>

Small

<small>SheCodes Workshops</small>

Em

<em>SheCodes Workshops</em>

CSS in HTML

Internal CSS

<head>
  <style>
    body {
      background: #f8f5ff;
    }

    h1 {
      color: purple;
      text-align: center;
    }
  </style>
</head>

External CSS

<head>
    <link rel="stylesheet" href="style.css" />
</head>

JavaScript in HTML

<body>
  <h1>
    SheCodes
  </h1>
  <script>
    alert("Hello SheCodes");
  </script>
</body>
<body>
  <h1>
    SheCodes
  </h1>
  <script src="app.js"></script>
</body>

SEO

Title element

<title>The title of your website - Brand</title>

<head>  
  <meta name="description"  content="This is an example of a meta description. This will often show up in search results." />
</head>

Table

   <table>
      <thead>
        <tr>
          <th>First name</th>
          <th>Last name</th>
          <th>Nationality</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Matt</td>
          <td>Delac</td>
          <td>French</td>
        </tr>
        <tr>
          <td>Amanda</td>
          <td>Smith</td>
          <td>American</td>
        </tr>
      </tbody>
    </table>
👩‍💻

What is SheCodes?

SheCodes teaches coding skills to busy women
Start your dream career in tech

4.9/5, our workshops are highly recommended by
230,000+ women, including employees from these companies

📬

Join Our Mailing List

Be the first to know about upcoming coding workshops, new coding tools, and other SheCodes related news.