0

'The Aligh Attribute' Question

The Align Attribute The align attribute is used to specify how the text is aligned. In the example below, we have a paragraph that is aligned to the center, and a line that is aligned to the right. <html> <head> <title>Attributes</title> </head> <body> <p align="center">This is a text <br /> <hr width="10%" align="right" /> This is also a text. </p> </body> </html> ------------------------------------------------------ I've quoted the above directly from the page. Why does the '<p' NOT have a closing '>' before the 'attribute'? Thanks.

14th Jun 2018, 4:42 PM
Mathew McRae
Mathew McRae - avatar
2 Answers
+ 5
Mathew McRae I think it is because we are altering the tag itself as you can see it's closed after the additional information. Before the text so it's not printed.
14th Jun 2018, 4:56 PM
bobbie
bobbie - avatar
+ 1
Ah, I understand. Thanks Bobby for taking the time to help me out.
14th Jun 2018, 7:13 PM
Mathew McRae
Mathew McRae - avatar