I am writing a quiz in HTML and I would like to insert a consistent blank vertical space between questions (like one would use vspace{3 cm}
in LaTeX).
For example:
<html>
<body>
<p>
This is the first question?
<!-- This is where I want about 3 cm of space -->
</p>
<p>
This is the second question?
<!-- This is where I want about 3 cm of space -->
</p>
</body>
</html>
Is there a straightforward way of doing this using just HTML and CSS?
How can I insert vertical blank space into an HTML document?
HTML Non-Breaking Space ( ) The simplest way to add a space in HTML (besides hitting the spacebar) is with the non-breaking space entity, written as or  .
Read up some on CSS. It's fun: CSS: em, px, pt, cm, in…
<style>
.bottom-three {
margin-bottom: 3cm;
}
</style>
<p class="bottom-three">
This is the first question?
</p>
<p class="bottom-three">
This is the second question?
</p>
While the previous answers are probably best for this situation, if you just want to do a one-off and don't want to bother with modifying other files, you can in-line the CSS.
<p style="margin-bottom:3cm;">This is the first question?</p>
I always use this cheap word for vertical spaces.
<p>Q1</p>
<br>
<p>Q2</p>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With