Try next:

.box {
  float: left;
  height: 20px;
  width: 20px;
  margin-bottom: 15px;
  border: 1px solid black;
  clear: both;
}

.red {
  background-color: red;
}

.green {
  background-color: green;
}

.blue {
  background-color: blue;
}
<div><div class='box red'></div>= Super Fast Trains</div>
<br>
<div><div class='box green'></div>= Mail/Express Trains</div>
<br>
<div><div class='box blue'></div>= Local/ Passenger Trains</div>

Answer from Max Wolfen on Stack Overflow
🌐
HTML Edit
htmledit.squarefree.com
Real-time HTML Editor
We cannot provide a description for this page right now
🌐
W3Schools
w3schools.com › charsets › ref_utf_geometric.asp
HTML Unicode Geometric Shapes
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more.
🌐
W3Schools
w3schools.com › howto › howto_css_shapes.asp
How To Create Different Shapes with CSS
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more.
🌐
Square
community.squareup.com › t5 › General-Discussion › Is-it-possible-to-insert-a-html-code-into-a-Square-website › td-p › 277508
Solved: Is it possible to insert a html code into a Square... - The Square Community
June 15, 2021 - I can convert it so i get HTML code, and that should allow it to remain fillable. Once that is inserted i can figure out how to make a submit button for the form. ... You can follow the instructions outlined here to add embeddable code to your Square Online website.
🌐
Sololearn
sololearn.com › en › Discuss › 3216768 › someone-tell-me-how-to-make-a-square-and-circle-in-web-development-in-html-css-or-js-language
Someone tell me how to make a square and circle in web development in html css or js language | Sololearn: Learn to code for FREE!
For example, the following HTML code will create a circle that is centered at (70, 70) and has a radius of 70 pixels <circle cx="50" cy="50" r="50"> </circle> To make a square in CSS, you can use the border-radius property.
🌐
Quora
quora.com › How-do-you-put-a-square-around-text-using-HTML-code
How to put a square around text using HTML code - Quora
HTML · Web Development and Desig... Web Design · + 5 · How do you put a square around text using HTML code? All related (33) Sort · Recommended · Assistant · Bot · · 6mo · Use CSS to draw a square border around text. The simplest method is to wrap the text in an inline element (span) and style that element with border, padding, display, and optional fixed width/height to force a perfect square.
Find elsewhere
🌐
OneCompiler
onecompiler.com › html › 3wq3n7eqw
SQUARE AND CUBE - HTML - OneCompiler
HTML element is everything present from start tag to end tag.
🌐
Toptal
toptal.com › designers › htmlarrows › math › square-root
Square Root HTML Symbol, Character and Entity Codes — HTML Arrows
HTML symbol, character and entity codes, ASCII, CSS and HEX values for Square Root, plus a panoply of others.
🌐
W3Schools
w3schools.com › html › tryit.asp
Unordered List with Square Bullets
The W3Schools online code editor allows you to edit code and view the result in your browser
🌐
Unicode Compart
compart.com › en › unicode › U+25FC
“◼” U+25FC Black Medium Square Unicode Character
U+25FC is the unicode hex value of the character Black Medium Square. Char U+25FC, Encodings, HTML Entitys:◼,◼,◼, UTF-8 (hex), UTF-16 (hex), UTF-32 (hex)
🌐
Devcamp
rails.devcamp.com › prework › guide › building-square-grid-html-structure
Building the Square Grid HTML Structure
Let's just call this the square text wrapper. Then inside of here, we'll have a h1 and I want to have just some lorem ipsum text, so we can say h1 lorem8, which is my Emmet abbreviation, that's going to give us some good heading content. Then, I want to do a paragraph tag and for this I want a little bit more content.
🌐
HTML Symbols
htmlsymbols.xyz › unicode › U+33A1
㎡ - Square m squared (U+33A1) - HTML Symbols
Detailed information about the Unicode character 'Square m squared' with code point U+33A1 that can be used as a symbol or icon on your site.
🌐
SitePoint
sitepoint.com › html & css
Making equal squares and putting alphabets and numbers outside - HTML & CSS - SitePoint Forums | Web Development & Design Community
December 14, 2023 - I used this as a reference to create a 12 by 8 squares(which are showing as rectangles) as shown in my JSFiddle below: JSFiddle Few things I’m trying to get fixed: Since I’ve Some text... , the size of all rectangles are same. but if I remove the paragraph tag, the size is disturbed.
🌐
W3Schools
w3schools.com › howto › tryit.asp
W3Schools online HTML editor
The W3Schools online code editor allows you to edit code and view the result in your browser
🌐
Toptal
toptal.com › designers › htmlarrows › math › square-image-of-or-equal-to
Square Image of or Equal To HTML Symbol, Character and Entity Codes — HTML Arrows
HTML symbol, character and entity codes, ASCII, CSS and HEX values for Square Image of or Equal To, plus a panoply of others.