How to align the header and the first paragraph | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to align the header and the first paragraph

I want the first paragraph to begin below the header and not continue as the same sentence with the header.

20th Aug 2017, 6:05 AM
Ayesha Hatalkar
Ayesha Hatalkar - avatar
7 Answers
+ 3
lets see the following example : <body> <h3 align="center">Heading</h3><p align="center"> This is a paragraph. This is a paragraph. This is a paragraph.</p> </body>
20th Aug 2017, 6:26 AM
Lakshay
Lakshay - avatar
+ 1
header tag is the container tag. You should use h1 or any h2... h6 tags for your header title and subtitle. And follow by p tags for the paragraphs.
20th Aug 2017, 6:13 AM
Calviղ
Calviղ - avatar
0
Did you use h1 and p tags?
20th Aug 2017, 6:08 AM
Calviղ
Calviղ - avatar
0
no. I used header followed by p open closed tags
20th Aug 2017, 6:09 AM
Ayesha Hatalkar
Ayesha Hatalkar - avatar
0
thank you will try that, but if my header is learn to code and the p is this is my first code to know more read on. this should be 2 sets of strings which should begin from 2 different lines one followed by the other but instead with I run the code it appears as one sentence
20th Aug 2017, 6:19 AM
Ayesha Hatalkar
Ayesha Hatalkar - avatar
0
I didn't know what is br. but you have close br and not opened it will this still run
20th Aug 2017, 6:29 AM
Ayesha Hatalkar
Ayesha Hatalkar - avatar
- 1
Here is an example of a header aligned to the center, the left, and the right: <h2 align="center"> <h2 align="left"> <h2 align="right"> Here is an example of a paragraph aligned to the center, the left, and the right: <p align="center"> <p align="left"> <p align="right"> Hope this helps😊
20th Aug 2017, 6:36 AM
Learnsolo