How to add Space in HtmlIn HTML, we can easily add the space in the document using the following different ways:
Using HtmlIf we want to add the space in the document using Html tag to show the space before and after the text then we have to follow the steps which are given below. Using these steps, we can easily add the space: Step 1: Firstly, we have to type the Html code in any text editor or open the existing Html file in the text editor in which we want to add the space. Step 2: Now, place the cursor where we want to add the space. And, then we have to press the spacebar from the keyboard. Basically, web page shows only one space between the two words. It does not matter that how much we have pressed the spacebar. Step 3: If we want to show more than one space before or after the text on the webpage then we have to give the following tag: Step 4: If we want to insert/add the longer space then we also use the following tags for showing two or four spaces between the text on the web page: Step 5: We can also add the tag, which displays the text on the web page as same as entered in the Html document. |
Step 3: Now, we have to type the paragraph tag and the class tab1 in the tag
of the Html. And, at last, we have to save the Html file and then run the file.
The output of the above Html code is shown in the following screenshot: