tumblr hit counter

Create Line Breaks - The
Element

Wednesday, October 23, 2013

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 (&nbsp;) instead of a normal space. For example, when coding the "10 Hungry Men" paragraph, we would use something similar to the following code:
<p>A good example of this technique appears in the movie "10&nbsp;Hungry&nbsp;Men."</p>
Page >> 1 2 3 4 5 6 7 8 9 10 11 12  13 14

No comments:

Post a Comment

 

Click Here to Start Learning

Get Update!

Join Us Now !
Enter your email address:

Note: Don't forget to click the confirmation link (in your email) to verify Your Entry!

LEARN WEB DESIGN