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 OverflowHTML 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.
Videos
06:21
Making One HTML Square - YouTube
00:56
Make SQUARE SHAPE with HTML & CSS | A Beginner's Guided | Code ...
00:58
How to Code a Square in HTML only (1 Minute Tutorial) - YouTube
06:04
How to Make a Square in HTML and CSS (Long tutorial) - YouTube
00:41
How to Make a Square Shape Using HTML & CSS | How to Draw a Square ...
00:44
How to create a square in CSS/HTML - YouTube
Top answer 1 of 7
32
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>
2 of 7
30
How about using the square html entity?
<div style="color:blue">■</div>
Top answer 1 of 2
2
this is how to make squares
<div id="square"></div>
#square {
width: 100px;
height: 100px;
background: red;
}
hope that helps source: https://css-tricks.com/examples/ShapesOfCSS/
2 of 2
0
For Html squares pls try as below
<div id="squares">
<div id="square1"></div>
<div id="square2"></div>
<div id="square3"></div>
</div>
and CSS as below
#squares div {
/* these styles will let the divs line up next to each other
while accepting dimensions */
display: block;
float: left;
width: 150px;
height: 150px;
/* a small margin to separate the blocks */
margin-right: 5px;
}
#square1 { background: red;}
#square2 { background: black;}
#square3 { background: yellow;}
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.
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.
OneCompiler
onecompiler.com › html › 3wq3n7eqw
SQUARE AND CUBE - HTML - OneCompiler
HTML element is everything present from start tag to end tag.
Top answer 1 of 2
7
Put those characters after the text you want or your can use <sup> tag around 2.
2²
2<sup>2</sup>
2 of 2
1
This is called Superscript and actually there is a special HTML element just for this task: <sup>
You simply need to wrap your desired text inside <sup></sup>
Here's an example:
<span>my<sup>text</sup></span>
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
Edureka Community
edureka.co › home › community › categories › web development › css › i want to create a small square colour filled box...
I want to create a small square colour filled box in HTML CSS And most important - I want to write one line after the box | Edureka Community
June 20, 2022 - I have created a colored square box using code .box { height: 20px; width: 20px; margin-bottom: ... and in the same margin, that would be great.
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.