HTML
entities are special codes used in HTML to represent characters that have a
specific meaning in HTML or are not easily typeable on a keyboard. They allow
you to display reserved characters, symbols, or characters that might not be
included in the standard keyboard.
HTML entities are written with & followed by a name or a number and then a semicolon (;).
They come in two main forms.
1. Named Entities: Use a descriptive name to represent the character.
Example: < for < (less than), > for > (greater than), & for & (ampersand) © fir © (Copyright sign) .
2. Numeric Entities: Use a numeric code to represent the character.
Example: < for < (less than), > for > (greater than), & for & (ampersand).
html-entities.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HTML Entities Example</title> </head> <body> <p>Using named entities: <div> & ©</p> <p>Using numeric entities: <div> & ©</p> <<< © Harikrishna >>> </body> </html>
References
https://www.w3schools.com/charsets/ref_html_entities_4.asp
https://developer.mozilla.org/en-US/docs/Glossary/Character_reference
No comments:
Post a Comment