give me the css and html for a landing page for a website about car rental in typescript

Sure! Here is an example of HTML and CSS code for a simple landing page for a car rental website using TypeScript:

HTML:

<!DOCTYPE html>
<html>
<head>
  <title>Car Rental Website</title>
  <link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
  <header>
    <h1>Welcome to Car Rental Website</h1>
    <nav>
      <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">About</a></li>
        <li><a href="#">Contact</a></li>
      </ul>
    </nav>
  </header>
  <section>
    <h2>Explore our car rental options</h2>
    <p>Choose from a wide selection of vehicles for rent</p>
    <a href="#" class="button">Book Now</a>
  </section>
  <footer>
    <p>&copy; 2021 Car Rental Website. All rights reserved.</p>
  </footer>
</body>
</html>
646 chars
28 lines

CSS (styles.css):

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

header {
  background-color: #333;
  color: #fff;
  padding: 20px;
}

nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  display: inline-block;
  margin-right: 10px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
}

section {
  text-align: center;
  padding: 50px;
  background-color: #f2f2f2;
}

.button {
  display: inline-block;
  background-color: #333;
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  font-weight: bold;
}

footer {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 20px;
}
643 chars
50 lines

Please note that typescript is typically used for writing JavaScript code with added type checking, and it's not typically used directly for styling HTML and CSS. However, you can use a build tool like webpack to compile TypeScript code that includes imports/references to CSS and HTML files.

Remember to save the HTML code as index.html and the CSS code as styles.css in the same directory, and link the CSS file in the HTML file using the appropriate relative path.

related categories

gistlibby LogSnag