To control how your web page will look on Twitter use Twitter cards. To check how your web page will look on the Twitter before actually posting it use Card validator.As of mid 2022, preview functionality was removed from the Card Validator 919.

One my example of Twitter cards:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#">

<head>
	<meta content="text/html; charset=UTF-8" name="Content-Type" />
    <meta name="twitter:card" content="summary" />
    <meta name="twitter:site" content="@milosev.com" />
    <meta name="twitter:creator" content="@stankomilosev" />
	<meta property="og:title" content="Test title" />	
    <meta property="og:url" content="http://www.milosev.com/gallery/allWithPics/india/www/index.html" />
    <meta property="og:image" content="http://www.milosev.com/gallery/allWithPics/india/thumbs/20191111_162437.jpg" />
    <meta property="og:description" content="Test description" />	
</head>

<body>
    test1
</body>

</html>
Here is test link.

Notice line:

	<meta content="text/html; charset=UTF-8" name="Content-Type" />
Without that line it will not work.