0
sololearn html basics do tags in within a tag reset tag modifiers
going through sololearn htm basics "this is also text" shows as align left but the paragraph is modified by align center does the <br /> tag reset the modifier for the parent tag if yes how do i set it again to center or is the way sololearn displays it incorrect, if correct would the better way to declare it be a separate paragraph or would this affect the way it displays on some browsers or affect indexing for search engines https://code.sololearn.com/WA18a22a18A1
5 Respuestas
+ 2
MaxBanter
The problem is not <br />. The problem is <hr />. You can't have horizontal lines inside p tags. A simple solution is closing the p tag before using hr, and then opening another p tag, like so
<p align="center">This is some text</p>
<hr align="center" />
<p align="center">This is also some text</p>
+ 5
Also... avoid using the align attribute as it is a legacy attribute that is considered bad practice in HTML5.
+ 1
Agree with David Carroll . Once you complete the HTML course, go onto the CSS course. You will mostly be using CSS for most of the styling. You will hardly use these attributes.
+ 1
MaxBanter
yes. In HTML, you define what the *content* of your webpage is. In CSS, you define what the content looks like, for example, the color of text, borders etc.
0
Okey so css is what i should be planning on for formatting