Page 173 - Webapplication11_C11_Flipbook
P. 173

<HR>
                 <DL>

                 <DT> Beverages </DT>
                 <DD> Hot and Cold Drinks</DD>
                 <DT> Cappuccino </DT>
                 <DD> Hot Drinks </DD>

                 </DL>
                 </BODY>
                 </HTML>
                 HTML Entities

                 In HTML, several letters have unique meanings, such as the less than sign (<), which defines the beginning of an HTML
                 tag. We must insert character entities in place of the actual characters themselves if we want the browser to display
                 these characters. The following table gives the Entity number for using in HTML code. (Entities are case sensitive)

                      Symbol             Entity Name            Entity Number                    Description

                                              &                                non-breaking space

                         <                   <                   <           less than symbol

                         >                   >                   >           greater than symbol

                         ®                  ®                  ®           registered trademark symbol

                         ©                 ©                  ©           copyright symbol

                         ₹                                         ₹          India rupee sign

                         $                 $                 $           dollar symbol

                         ‘                 '                   '           single quotation mark (apostrophe)

                         “                 "                   "           double quotation mark

                         &                  &                   &           ampersand

                 The HTML entity name can be used to add these symbols to an HTML page. If no entity name is available, the entity
                 number might be used instead.
                 For example, the following code will give the output as shown below:

                 <!DOCTYPE html>
                 <html>
                 <body>

                 <p>This will display $</p>
                 <p>This will display ₹</p>
                 <p>This will display > symbol</p>
                 </body>

                 </html>

                                                                                Website Building Using HTML and CSS  171
   168   169   170   171   172   173   174   175   176   177   178