Skip to main content

HTML entities

HTML Entities

HTML Entities

Some characters are reserver in html.

If you use the less than (<) or greater than (&gt) signs in your text, the browser might mix them with tags.

character entities are used to display reserved characters in html.

A character entity looks like this:

&entity_name;

OR

&#entity_number

To display a less than sign (<) we must write: &lt; or &#60;

Advantages of using an entity name: An entity name is easy to remember.

Disadvantages of using an entity name: Browsers may not support all entity names, but the support for entity numbers is good.

Some usefull HTML Character Entities

Result Description Entity Name Entity Number
non-breaking space &nbsp; &amp#160;
< less than &lt; &#60;
> greater than &gt; &#62;
& ampersand &amp; &38;
" double quotation mark &quot; &#34
' single quotation mark
(apostrope)
&apos; &#39;
¢ cent &cent; &#162;
£ pound &pound; &#163;
¥ yen &yen; &#165;
euro &euro; &#8364;
© copy &copyright &#169;
® registerd trademark &reg; &#174;

Note: Entity names are case sensitive.

Combining Diacritical Marks

A Diacritical mark is a "glyph" added to a letter.
Some diacritical marks, like grave(̀) and acute (́) are called accents;

Diacritical marks can appear both above and below a letter, inside a letter, and between two letters.

Diacritical marks can be used in combination with alphanumeric characters to produce a character that is not present in the character set (encodin) used int the page.

Here are some examples:

Mark Character Constants Result
̀ a a&#768; a&#768
́ a a&#769;
̂ a a&#770;
̃ a a&#771;
̀ O O&#769;
́ O O&#769;
̂ O O&#770;
̃ O O&#771;

Thanks for your visit!!!

Comments

Popular posts from this blog

HTML formatting tags

Formatting tags in HTML. There are different types of formatting tags in HTML and these tags are.~ <b> <strong> <i> <em> <mark> <small> <del> <ins> <sub> <sup> HTML formatting tags specify how the text can appear in the browser like the text should appear bold, italic, small, large, etc. Now let’s understand each tag one by one. Firstly we will see a bold and strong tag. let’s understood the bold tag. Anything that appears within the <b>…</b> tag is displayed in bold. The HTML <b> tag defines bold text, without any extra importance. Then we have the strong tag. The HTML strong <strong> tag defines the text with strong importance. The content inside is typically displayed in bold. Then we have the HTML italic and emphasis elements. Anything that appears within <i>….</i> element is displayed in italics. The HTML  <i>the the  element defines the specific part of the ...

What are some of the best ways to learn programming?

1. Pick a language   with a purpose. Before you start learning code for the first time or continue your education, you should have a clear understanding of what you want to learn and why you want to learn it. Do you prefer developing games to developing websites? Think about data science. Before choosing a programming language, you should have a goal in mind because different languages have different uses. If you are interested and engaged in the subject, you will have a better understanding of the material and move much more quickly. 2. Start learning the fundamentals. Start at the bottom and work your way up once you've chosen a language to learn. Even though you might be tempted to enroll in intermediate courses or try taking multiple classes at once, it is best to master the fundamentals before moving on. You run the risk of making mistakes when you skip over the fundamentals of programming, which will become apparent as you progress through more challenging readings. After th...

HTML Elements

 HTML Elements An HTML element is defined by a start tag, some content, and end tag. The HTML element is everything from the start tag to the end tag: <tag name> Content goes here....</tag name> Examples: <h1>First heading</h1> <p> First paragraph</p> Starting tag: <h1> Ending tag: </h1>  Element content: First heading Note: Some elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag!. Nested HTML Elements: HTML elements can be nested (this means that element can obtain other elements). All HTML documents consist of nested HTML elements.  The following example consist four HTML elements(<html>, <body>, <h1> an d <p>). <!DOCTYPE html> <html> <body> <h1> First heading </h1> <p> First paragraph </p> </body> </html> Example explained The <html> element is the ...