Curriculum
Course: HTML Basic
Login

Curriculum

HTML Basic

HTML Introduction

0/1

HTML Editors

0/1

HTML Elements

0/1

HTML Attributes

0/1

HTML Headings

0/1

HTML Paragraphs

0/1

HTML Styles

0/1

HTML Formatting

0/1

HTML Quotation

0/1

HTML Comments

0/1

HTML Colors

0/1

HTML Favicon

0/1

HTML Page Title

0/1

HTML Block and Inline

0/1

HTML Iframes

0/1

HTML Java Script

0/1

HTML File Paths

0/1

HTML - The Head Element

0/1

HTML Style Guide

0/1

HTML Entities

0/1

HTML Symbols

0/1
Text lesson

HTML Entities

HTML Character Entities

Certain characters are reserved in HTML.

If you incorporate the less than (<) or greater than (>) signs in your HTML content, they might be confused with tags by the browser.

To avoid this, entity names or entity numbers can be utilized to represent reserved HTML characters.

Entity names are structured as follows:

&entity_name;

Entity numbers are represented in this format:

&#entity_number;

To display a less than sign (<), we must write it as < or as <.

Entity names are simpler to recall compared to entity numbers.

Non-breaking Space

A frequently utilized HTML entity is the non-breaking space: &nbsp; 

A non-breaking space functions as a space that remains intact without causing a line break.

When two words are separated by a non-breaking space, they remain together without breaking onto a new line. This is particularly useful when separating the words might disrupt the flow of content.

Examples:

  • § 10
  • 10 km/h
  • 10 PM

Another common application of the non-breaking space is to prevent browsers from trimming spaces in HTML pages.

For instance, if you include 10 spaces in your text, the browser will eliminate 9 of them. To retain actual spaces in your text, you can utilize the   character entity.

The non-breaking hyphen (‑) is employed to designate a hyphen character (‑) that does not cause a line break.

Some Useful HTML Character Entities

Result

Description

Name

Number

 

non-breaking space

&nbsp;

 

< 

less than

&lt;

<

> 

greater than

&gt;

>

&

ampersand

&amp;

&

double quotation mark 

&quot;

"

single quotation mark

&apos;

'

¢

cent

&cent;

¢

£

pound

&pound;

£

¥

yen

&yen;

¥

euro

&euro;

©

copyright

&copy;

©

®

trademark

&reg;

®

Combining Diacritical Marks

A diacritical mark is a “glyph” attached to a letter.

Certain diacritical marks, such as grave ( ̀) and acute ( ́), are referred to as accents.

Diacritical marks can be combined with alphanumeric characters to generate a character not initially available in the character set (encoding) utilized on the page.

Below are a few examples:

Mark

Character

Construct

Result

 ̀

a

 ́

a

̂

a

â

 ̃

a

 ̀

O

 ́

O

̂

O

Ô

 ̃

O