Whenever we use the <br /> element, anything following it starts on the next line. This tag is an example of an empty element, where we do not need opening and closing tags, as there is nothing to go in between them.
Note: The <br /> element has a space between the characters br and the forward slash. If we omit this space, older browsers will have trouble rendering the line break, while if we miss the forward slash character and just use <br> it is not valid XHTML
Example:
My Dear<br />Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio.<br />Regards<br />Ahmad Bin Musa
Centring Content - The <center> Element:
We can use <center> tag to put any content in the center of the page or any table cell.Example:
<p>This is not in the center.</p>
<center><p>This is in the center.</p></center>
Nonbreaking Spaces:
For example we were to use the phrase "10 Hungry Men." Here we would not want a browser to split the "10" and "Hungry" across two lines:
A good example of this technique appears in the movie "10 Hungry Men."
In cases where we do not want the client browser to break text, we should use a nonbreaking space entity ( ) instead of a normal space. For example, when coding the "10 Hungry Men" paragraph, we would use something similar to the following code:

No comments:
Post a Comment