The more space in HTML page, it looks better. Just check this CodeBlogMoney site, more than 70% is space. HTML Space will help to make the document more attractive and readable.
HTML Space makes the site looks better. While learning the first time everyone uses space button to generate more space, and when we run in the browser it still was not reflected.
Do you remember those days? or you are here because it’s not reflected on your page? 🙂 use <pre> tag to use keyboard space. explained in section 3.
HTML Space, 3 ways to make it happen in HTML Page.
1. in HTML
creates extra space after and before any text in HTML.
<html> <head> <title>Create Space in HTML</title> </header> <body> How are you doing? </body> </html>
HTML uses concepts of Margin, border and padding to create more space around the element or object of the HTML.
It can achieve the style attribute of the HTML.
In this image at the right side shows the information about the margin, border and padding of an element of HTML. Like this element has padding at the top, left, right and at the bottom.
<html> <head> <title>Create Space using Padding</title> </header> <body> <div style="padding-top:50px;padding-left:50px"> How are you doing? <div> </body> </html>
<pre> means the Preformatted text. It preserve the space in the HTML document which are under the <pre> tag. easiest way to add space.
<html> <head> <title>Create Space using Padding</title> </header> <body> <pre> How are you doing? <pre> </body> </html>
HTML tool to try HTML code.
More articles to read: