Justify Alignment in HTML
In this article, we will see how to align a text in justify alignment in HTML. We can use also the CSS “Align” property if you cannot use the <p> tag. If you can use <p> tag, you can use the “align” attribute.
Step by Step guide to align justify
<!DOCTYPE html>
<html>
<head>
<title> JUSTIFY ALIGN </title>
</head>
<body>
<p align="justify">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</body>
</html>
Output:
Steps:
- First, write HTML general syntax.
- Then inside the body, we created <p> tag with some text inside.
- To align justify text, we need to use the “align” attribute in <p> tag and give value as “Justify“.
- See the above output, the text is displayed to justify alignment.