<main>
<h1>Accordion Element</h1>
<details>
    <summary>What is HTML?</summary>
    <p>HTML (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content.</p>
</details>
<details>
    <summary>What is CSS?</summary>
    <p>Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document written in HTML.</p>
</details>
<details>
    <summary>What is JavaScript?</summary>
    <p>JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions.</p>
</details>
</main>
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;400&display=swap');

:root {
  --white: rgba(254,255,250,1);
--gray: rgba(220,231,235,1);
--red: rgba(255,104,115,1);
--black: rgba(48,69,92,0.8);
--type: 'Open Sans', sans-serif;
}
  
html {
    width: 100%;
  height: 100%;
  background-color: var(--gray);
  font-family: var(--type);
  color: var(--black);
}

main {
   display: flex;
  flex-direction: column;
    margin: 10px auto 0 auto;
  box-shadow: 0 10px 0 0 var(--red) inset;
  background-color: var(--white);
  max-width: 500px;
  padding: 30px;
}
  
details summary::-webkit-details-marker {
  display:none;
}
details[open] > summary:before {
  transform: rotate(90deg);
}

summary:before {
  content: '';
  border-width: .4rem;
  border-style: solid;
  border-color: transparent transparent transparent #fff;
  position: absolute;
  top: 1.3rem;
  left: 1rem;
  transform: rotate(0);
  transform-origin: .2rem 50%;
  transition: .5s transform ease;
}
summary {
  position: relative;
  font-size: 26px;
  line-height: 34px;
  padding: 16px 0;
  font-weight: 400;
  letter-spacing: 1px;
  margin: 0;
  cursor: pointer;
}

p {
    color: var(--black);
  font-size: 17px;
  line-height: 26px;
  letter-spacing: 1px;
  margin-top: 14px;
}

h1  {
    color: var(--red);
}


h1 {
    text-transform: uppercase;
  font-size: 36px;
  line-height: 42px;
  letter-spacing: 3px;
  font-weight: 100;
}

  


External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.