Aligning Text in css with example

CSS 3 cascading style sheets

How to apply Fonts in css with example


CSS – Cascading Style Sheet In this lecture you will learn Aligning Text and displaying The text-align property is used to set the horizontal alignment of a text. A text can be aligned as left, right, centered, or justified. The following example shows center aligned, and left and right aligned text (left alignment is default if text direction is left-to-right, and right alignment is default if text direction is right-to-left): for instance fonts css examples with source code here: <!DOCTYPE html> <html> <head> <style> h1 { text-align: center; } h2 { text-align: left; } h3 { text-align: right; } </style> </head> <body> <h1>Heading 1 (center)</h1> <h2>Heading 2 (left)</h2> <h3>Heading 3 (right)</h3> <p>The three headings above are aligned center, left and right.</p> </body> </html>

in the above shown example applied aligning text in css to a html tag elements, in this example source code written in p tag is applied on style attribute with parameters are having with their values.
similarly one p tag of html element is also applied for aligning text

web tutorial

css

Web development course Data Science courses: Web Development
Online courseOnline Courses: Include Certification
Harisystems is optimized for learning, testing and training. courses are designed to be simplified to improve reading and basic understanding for beginners to expert level. Tutorials and examples are constantly reviewed to avoid errors, however we cannot warrant full correctness of all content. if any found need to correct write us at info@harisystems.com. we Harisystems is not responsible for any with this tutorials, While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2007-2023 by Harisystems. All Rights Reserved.
Copyright © Harisystems 2023