html

Collapsible element

Rendered html

<details>
  <summary>Some text goes here</summary>
  ... some more text goes here.
</details>

With the open attribute <details open> the details are unfolded by default.

Minimal 2 column layout

Rendered html

<style>
.grid-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1em
}
.col1 {
  grid-column-start: 1;
  background-color: red;
  padding-left: 1em;
}
.col2 {
  grid-column-start: 2;
  background-color: green;
  padding-left: 1em;
}
</style>
<div class="grid-2col">
  <div class="col1">
    <p>Some text in the first column.</p>
  </div>
  <div class="col2">
    <p>Some text in the second column.</p>
  </div>
</div>

Minimal grid area

Rendered html

<style>
.page-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-template-areas:
      "h h"
      "s m"
      "f f";
  gap: 1em;
}
.gh {
  grid-area: h;
  background-color: orange;
}
.gs {
  grid-area: s;
  background-color: green;
}
.gm {
  grid-area: m;
  background-color: gray;
}
.gf {
  grid-area: f;
  background-color: yellow;
}
.nav-items {
  display: flex;                  /* flexbox model => flexible layout on row */
  justify-content: space-around;  /* align flex boxes horizontally with space around */
  align-items: center;            /* center flex items vertically */
  list-style: none;
}
p {
  margin: 1em;
}
</style>
<div class="page-grid">
  <div class="gh">
      <ul class="nav-items">
          <li class="nav-item"><a href="">aa</a></li>
          <li class="nav-item"><a href="">bb</a></li>
          <li class="nav-item"><a href="">cc</a></li>
      </ul>
  </div>
  <div class="gs">
    <p>Some text in the second column.</p>
  </div>
  <div class="gm">
    <p>Some text in the second column.</p>
  </div>
  <div class="gf">
    <p>Some text in the second column.</p>
  </div>
</div>

Minimal tabs

Rendered html

<script>
const showTab = (E, T) => {
    const TABS = Array.from(document.getElementsByClassName("content"));
    TABS.forEach(T => {
        T.style.display = "none";
    });

    document.getElementById(T).style.display = "block";
};

window.onload = () => {
    document.getElementById("bTab1").onclick = (E) => {
        showTab(E, "tTab1");
    };
    document.getElementById("bTab2").onclick = (E) => {
        showTab(E, "tTab2");
    };
}
</script>

<button type="button" id="bTab1">Tab1</button>
<button type="button" id="bTab2">Tab2</button>

<div id="tTab1" class="content" style="display: block;">
    <p>Some content goes here ...</p>
</div>

<div id="tTab2" class="content" style="display: none;">
    <p>... and there.</p>
</div>