Loading Please Wait...
HTML have some reserved keywords for the syntax such as less than, greater than, etc. We can not write these keywords on the webpage. To include these keywords, HTML provided entity codes.
For example, we want to write some comparison but when we use less than (<) or greater than (>), the browser get confuse and treat them as HTML tag. In such situation we use HTML entities.
HTML entity can be added by either using entity name or entity code number or hexadecimal value.
&entity_name
OR
&#entity_code
For example to display less than (<), use < or <
Entity name is easy to remember but some entity name is not recognize by all the browsers. While Entity code number is supported by all the browsers.
If we want to write more than 1 space in our text then browser ignore all the extra space and truncate the text. To achieve this we can use non-breaking space
Another use case of non-breaking space is when we want text to stick together and not break into new line such as 10 kg, $ 100.
Without using non-breaking space, they may break and appears in new line. 10 appear in one line and kg appears in new line.
With non-breaking space, they stick together. If there is need of line break then the whole 10 kg appears in new line.
Name | Code | Description | Output | Test Online |
---|---|---|---|---|
|   | Non-breaking space | Test Online | |
‐ | ‑ | Non-breaking hyphen | ‐ | Test Online |
< | < | Less than | < | Test Online |
> | > | Greater than | > | Test Online |
& | & | Am percent | & | Test Online |
© | © | Copyright | © | Test Online |
™ | ™ | Trademark | ™ | Test Online |
€ | € | Euro sign | € | Test Online |
How you feel about this blog:
Share this blog on:
If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com
Contact UsWe are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..
Copyright ©
, Lynxsia IT Solutions, All rights reserved