Question: What dish was the basis for egg tarts?
About the article "Egg tart", section "History".

Candidate passages:
Custard tarts were introduced in Hong Kong in the 1940s by cha chaan tengs.
Which was derived from the original "pastel de nata" ( Portuguese egg tarts ).
Egg tarts evolved from the very similar Portuguese egg tart pastries, known as pastel de nata, traveling to Hong Kong via the Portuguese colony of Macau.
Hong Kong egg tarts are an adaptation of English custard tarts.
Canton (modern Guangdong) had more frequent contact with the West, in particular Britain, than the rest of China.
Also, as a former British colony, Hong Kong adopted some British cuisine.
 pudding.
Bakewell pudding is a jam pastry with an egg and ground almond enriched filling.
It is not to be confused with Bakewell tart, which is a completely different confection, made with shortcrust pastry, an almond topping and a sponge and jam filling; Mr Kipling also made "Cherry Bakewells", often also known as Bakewell tarts.
The origins of the pudding are not clear; however, the generally accepted story is that it was first made by accident in 1820 when the landlady of the White Horse Inn (now called the Rutland Arms Hotel) left instructions for her cook to make a jam tart with an egg and almond paste pastry base.
The cook, instead of stirring the eggs and almond paste mixture into the pastry, spread it on top of the jam.
When cooked the jam rose through the paste.
The result was successful enough for it to become a popular dish at the Inn, and commercial variations, usually with icing sugar on top, have spread the name.
Three shops in Bakewell offer what they each claim is the original recipe.
The Bakewell Tart Shop & Coffee House sells four different variations of the confection, including: "Bakewell Tart", "Iced Bakewell Tart", "Moist Bakewell Tart" and "Traditional Bakewell Pudding"; whilst The Old Original Bakewell Pudding Shop and Bloomers of Bakewell both sell a "Bakewell Pudding". 
Custard tarts have long been a favourite pastry in Britain and the Commonwealth.
They are often called egg custard tarts or simply egg custards to distinguish the egg-based filling from the commonly served cornflour-based custards.
They are sold in supermarkets and bakeries throughout the UK.
In Britain, the custard tart is regarded as a classic British dish, and as such a version by Marcus Wareing was selected on the BBC television program "Great British Menu" as the final course of a banquet to celebrate the Queen's 80th birthday.
Variations on the classic recipe include the Manchester tart, where a layer of jam is spread on the pastry before the custard is added.
Other versions may have some fresh fruit, such as rhubarb cooked into the filling.
Versions topped with elaborate arrangements of fruit show the influence of French pâtisserie. 
A tart is a baked dish consisting of a filling over a pastry base with an open top not covered with pastry.
The pastry is usually shortcrust pastry; the filling may be sweet or savoury, though modern tarts are usually fruit-based, sometimes with custard.
Tartlet refers to a miniature tart; an example would be egg tarts.
Examples of tarts include jam tarts, which may be different colours depending on the flavour of the jam used to fill them, and the Bakewell tart.
The categories of 'tart', 'flan', and 'pie' overlap, with no sharp distinctions, though 'pie' is the more common term in the United States.
The French word "tarte" can be translated to mean either pie or tart, as both are mainly the same with the exception of a pie usually covering the filling in pastry, while flans and tarts leave it open.
The Italian crostata, dating to at least the mid-1400s, has been described as a "rustic free-form version of an open fruit tart".
Early medieval tarts generally had meat fillings, but later ones were often based on fruit and custard.
"Tarte Tatin" is an upside-down tart, of apples, other fruit, or onions.
Savoury tarts include quiche, a family of savoury tarts with a mostly custard filling; German Zwiebelkuchen 'onion tart', and Swiss cheese tart made from Gruyere. 
During World War II and prompted by meat rations, a manager for a White Castle at St. Louis introduced the first fast food egg dish with a fried egg sandwich.
However, the dish was unpopular, and was abandoned as soon as the meat rations were lifted.