Style regular (untagged) HTML text with CSS

share link

by vsasikalabe dot icon Updated: Mar 14, 2023

technology logo
technology logo

Guide Kit Guide Kit  

CSS has more properties for styling the text. The margin property sets an element's margins, and it has the following properties: 

  1. margin-top 
  2. margin-right 
  3. margin-bottom 
  4. margin-left 

If the margin property has four values: 10px 5px 15px 20px, then it is assigned to the top margin as 10px, the right margin is 5px, the bottom margin is 15px, and the left margin is 20px. If the margin property has three values: 10px 5px 15px, then the value is moved to the top margin is 10px, right, and left margins are 5px, and the bottom margin is 15px. When the margin property has two values: margin: 10px and 5px, top and bottom margins are 10px, and right and left margins are 5px. If the margin property has one value: for example, 10px, then all four margins are 10px. Note that Negative values are allowed. 

A strong tag is used to highlight the particular text. The tag br is an empty tag, and it is used to give a single line break between the sentences.  

Here is an example of how to style regular (untagged) HTML text with CSS: 

Preview of the output that you will get on running this code from your IDE.



Follow the steps carefully to get the output easily.

  1. Download and Install VS Code on your Desktop.
  2. Open the VS Code and install Live Server from Extensions.
  3. Open the new file and save as filename.html.
  4. Copy the code using the "Copy" button above, and paste it into your html file.
  5. Click Go live button in the bottom right corner to get the output.

I hope you found this useful. I have added version information in the following sections.

I found this code snippet by searching for ' Style regular (untagged) HTML text with CSS' in kandi. You can try any such use case!

Environment Tested

I tested this solution in the following versions. Be mindful of changes when working with other versions.

  1. The solution is created in VS Code 1.73.1 version.
  2. Live Server v5.7.9

Using this solution, we are able to style regular (untagged) HTML text using CSS with simple steps. This process also facilities an easy way to use, hassle-free method to create a hands-on working version of code which would help us to style HTML text.


  1. For any support on kandi solution kits, please use the chat
  2. For further learning resources, visit the Open Weaver Community learning page