Jerusalem was the capital of Palestine under the British Mandate which ended in 1948. The United Nations put forward a partition plan in 1947 dividing Palestine into two states but leaving Jerusalem and Bethlehem under international control. At the end of the Israelis war of independence, the Israelis controlled West Jerusalem, but not the Old City in East Jerusalem and the areas to the north and south of it.
Israel army tanks invaded East Jerusalem in June 1967 and the Israeli parliament passed a law in 1980 annexing East Jerusalem (and surrounding areas) as part of the Israeli state. This has never been accepted by the UN or by any country other than Israel itself.
Ever since Israel was founded in 1948, West Jerusalem has been recognised by the international community as part of Israel, but not as its capital. That has been Tel Aviv. This is not because they are necessarily against the idea of an Israeli capital situated in Jerusalem, but because it has to be part of a negotiated peace settlement.
Every US President in the last 50 years has refused to recognise Jerusalem or move the US embassy – even though Congress passed a law to that effect in 1995.
In all negotiations (including Brexit) it is a fundamental principle that nothing can be finally agreed until everything has been agreed. The status of Jerusalem can only be settled as a part of a comprehensive peace agreement.
No country currently has its embassy in Jerusalem. At one time 16 countries did so (without recognising it as the capital), but one by one they all moved their embassies back to Tel Aviv.
The founding principle of the UN in 1945 was to stop the acquisition of territory by force. If Trump is recognising the whole of Jerusalem as sovereign Israeli territory (and that is not entirely clear yet) it means he is accepting the right of countries to take land by force. Certainly, by moving the US embassy to Jerusalem, Trump is breaking ranks with the rest of the world and undermining the diplomatic solidarity of the international community in upholding the principles of international law.
There is a real danger that the recognition of Jerusalem will be taken by Netanyahu as a signal that he can gradually annex most of the Palestinian territories.
UK policy is that Jerusalem should be a shared city. The policy of the Palestinian Authority is that East Jerusalem should be their capital, although President Abbas has said they would be willing to discuss a shared city. Many on the Israeli left believe that Israel should let go of occupied East Jerusalem. “There will be no peace without the division of Jerusalem,” said the leader of Meretz Zehava Gal-On.
However, there are 350,000 Palestinians living in Jerusalem, 38% of the whole population and a substantial majority within the boundaries of East Jerusalem.
The strategy of the current Israeli government is to create settlements in East Jerusalem and gradually drive the Palestinians out. The Israelis known that Palestine is not a viable state without East Jerusalem.
The Palestinians would almost certainly recognise West Jerusalem as the Israeli capital just as soon as Israel recognised East Jerusalem as their capital.