Professional Documents
Culture Documents
PHP P1
PHP P1
PHP P1
OBJECTIVE-Design PHP based web pages using correct PHP, CSS, and XHTML syntax,
structure.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PHP Web Page</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f2f2f2;
}
img{
border:7px solid black;
border-radius:10px;
margin-left:500px;
}
header {
background-color: #333;
color: white;
text-align: center;
padding: 1em;
}
nav {
background-color: #555;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
}
nav li {
float: left;
}
nav a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
section {
padding: 20px;
}
footer {
background-color: #333;
color: white;
text-align: center;
padding: 1em;
position: fixed;
bottom: 0;
width: 100%;
}</style>
</head>
<body>
<header>
<h1>PHP Practical-1</h1>
</header>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
<section>
<?php
// PHP code for dynamic content
$message = "<u>Objective</u>-Design PHP based web pages using correct PHP,
CSS, and XHTML syntax, structure.";
echo "<p>$message</p>";
?>
</section>
<main>
<img src="DN.jpg" alt="D.N. Polytechnic" width="450px" ,height="400px">
</main>
<footer>
<p>© <?php echo date("Y"); ?> My PHP Web Page</p>
</footer>
</body>
</html>
X------------------------------------------------------------------
X--------------------------------------------------X