- To align text you use the text-align property in CSS:
- By default all text will align to the left unless you specify otherwise within your CSS code.
- You can place a period after a CSS property such as heading 1 (h1) or paragraph (p) and then a class name to separate it from your other specifications for that main property.
- You might have a h1 like:
- Then you may want a h1 that centers text also:
- To give a border around text you use the border property:
border: 3px solid red;