The Developer Brains


Web Designing | Web Development


SEE MORE














</HTML Character Entities>





HTML Charsets Entities

In HTML some character are reserved like less than (<) and greater than (>) , SO whenever your text containt this characters , Browser will mix them with tags , Reserved characters in HTML must be replaced considering quality entities.
So in this case we use character entities to display reserved characters correctly.

				
&entity_name; or &entity_number;
				
				
so display the above example we use : (&lt;) and (&#60;) for less than


SEE MORE




















</Some famous character Entities >


Second Defination: Many symbols and special characters are required while developing a web page in html, but as we know that sometimes the use of characters directly may interfere with the actual html code which have certain characters reserved and also certain characters being not available on keyboard. Thus, to avoid the conflict and at same time to be able to use different symbols in our code w3 org provides us with 'Character Entities'

Character Entities are predefined with 'Entity Name' - &entity_name; and 'Entity Number' - &entity_number; so we need to use either of the two for the required symbol to be rendered on our page.

A simple example with the use of character entity for 'magnifying glass' :


				
<input type="text" placeholder=" &#128269; Search"/> 
            
				
Try it Yourself
Result:


Non-breaking Space

Non-breaking Space is one the most usable Entity to adding space

In HTML if you write 5 spaces in your text , browser will remove all extra space and only one space is left in this case browser only display 1 space and remove 4 , that's why we use &nbsp;(Non-breaking Space) character entity

Example: without &nbsp; entity and with &nbsp;         entity

Some famous character Entities

NUMBER ASCII ANSI ISO-8859-1 UTF-8 DESCRIPTION
32 space
32 Space
33 ! Exclamation Mark
34 " Quotation Mark
35 # Hash Sign














</HTML> Quiz Question>


Which Charset Entity is use for single_space ?



Check Now



HTML5 QUIZ







Next: HTML Global Attributes


Previous

      

Next Page













  Share TDB SCHOOL  

Share this E-Learning Website on social media platforms with your friends and followers