How can CSS be utilized for website layout instead of tables in PHP?

Using CSS for website layout instead of tables in PHP involves creating a stylesheet with styling rules for the different elements on the webpage. This allows for a more flexible and responsive design compared to using tables for layout. By using CSS, you can easily adjust the layout and styling of your website without having to modify the HTML structure.

<!DOCTYPE html>
<html>
<head>
    <title>Website Layout with CSS</title>
    <link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
    <div class="container">
        <header>
            <h1>Welcome to our website!</h1>
        </header>
        <nav>
            <ul>
                <li><a href="#">Home</a></li>
                <li><a href="#">About</a></li>
                <li><a href="#">Services</a></li>
                <li><a href="#">Contact</a></li>
            </ul>
        </nav>
        <section>
            <h2>About Us</h2>
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
        </section>
        <footer>
            <p>© 2021 My Website</p>
        </footer>
    </div>
</body>
</html>
```

styles.css:
```css
.container {
    width: 80%;
    margin: 0 auto;
}

header {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px;
}

nav {
    background-color: #f4f4f4;
    padding: 10px;
}

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

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

section {
    padding: 10px;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px;
}