False.
The iPhone 8 has 2 hours more battery life over the 7.
The iPhone X has about an hour less battery life than the 8, and even the 7 Plus.
Source:
https://www.apple.com/iphone/compare/
Let's go step by step here:
You say: The iPhone 8 has 2 hours more battery life over the 7.
Apple's page you linked to says: Lasts about the same as iPhone 7
You say: The iPhone X has about an hour less battery life than the 8, and even the 7 Plus.
Apple's page: Lasts up to 2 hours longer than iPhone 7
So if the 8 has the same battery life as the 7, and the X has 2 hours more than the 7, then the X has 2 hours more than the 8.
You do have a point that the Plus models have more battery life than the non-plus models, and may have as much or more than the X, but none of that is reflected in what you linked to.