Search This Blog

Monday, 10 October 2011

Cenetring Text, Special Char, Horizontal Rules, Comments


Centering Text

When making your page, you may also want to center your header or whatever else. In order to center text you make use the following code:

<CENTER>This is the text that it applies to</CENTER>

Special Characters

HTML Entities and/or ISO Latin-1 codes can be placed in source code like any other alphanumeric characters to produce special characters and symbols that cannot be generated in HTML with normal keyboard commands.
For example, to render Düsseldorf the HTML source should read D&uuml;sseldorf or D&#252;sseldorf


In many cases you may find that you may need to insert special characters. They are very simple to insert, if you know what each character is. As you may remember we added a space by using &nbsp;. Other special characters can be added by doing & followed by the code for them, which can be found here (please note: this is not on my site),and then you would place a semi-colon afterwards. here are some examples:
&#169; produces ©
&#38; produces &
&#162; produces ¢
&#174; produces ®
&#177; produces ±
&#178; produces _
etc...


Horizontal rules

Horizontal lines can be added by doing the following code:
<HR>
You can also change the width of the line as well as align them to the left or right, as can be seen here:
<HR ALIGN="left" WIDTH="50%">
Please note that you can have the width in pixels instead of percentages as well. You can also change the height in pixels by doing the following:
<HR SIZE="5">

Comments

Comments are very useful for people that want to identify things in their HTML. They are used when multiple
people update website. They are also used to "block" the HTML code. The user does not see a comment unless they view the source code. You can add a comment by doing the following:
<!-- This is the comment -->


No comments:

Post a Comment