Html elements not appearing below each other

I’m building my portfolio and for some reason the contents of the nav and introduction section begin on the same line. Correct me if I’m wrong, but aren’t the contents of different html tags supposed to stack on top of each other by default. This is a screenshot of what i currently get.


<!DOCTYPE html>
<html lang="en">
{% load static %}
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link href="" rel="stylesheet">
  <link rel="stylesheet" href="{% static 'portfolio/style.css' %}" type="text/css">
  <title>Aot Portal</title>


    <h3> AOT </h3>

  <section id="introduction">
    <div class="headertext">
      <h1> Some text </h1>
      <h3> Programmer  --- Gamer  --- Athlete </h3>
    <div class="headeravatar">
    <img src="{% static 'portfolio/avatar.png' %}" alt="avatar">

  <section id="illustrations">
    <div class="flexcontainer">
      <div class="pic1"> <img src="{% static 'portfolio/footballer.png' %}"> </div>
      <div class="pic2"> <img src="{% static 'portfolio/gaming.png' %}"> </div>
      <div class="pic3"> <img src="{% static 'portfolio/coding.png' %}"> </div>



                                          /* header */
/* nav */
nav h3{
  text-align: right;

/* headertext */

  text-align: center;

#introduction img {
  width: 20%;

#introduction h1{

  display: block;
  font-size: 40px;
  font-weight: 800;
#introduction h1, h3{
  font-family: 'Balsamiq Sans', 'Roboto','sans-serif';

  color: Black;

/* illustrations */
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-evenly;

.flexcontainer img{
  width :250px;

Your understanding is correct. By default things will stack on top of each other. The reason “AOT” and “Some Text” appear on the same line is because of the declaration above.

If you want “AOT” on the left, but to remain on it’s own line try display:flex.

Thank you for the reply. I used flex and it now stacks properly