-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path. php-with-html.php
More file actions
28 lines (22 loc) · 909 Bytes
/
. php-with-html.php
File metadata and controls
28 lines (22 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
//html and css add on php
//Write html inside php
//Add some style with php
$h2_color = "gray";
echo "<h1 style= 'color:green'>php with html</h1>";
$name = "dalveer singh";
echo "<h1 style='color:red' > my name is $name</h1>";
$name1 = "dalveer";
echo "<h1 style='color:yellow'>my name is " . $name1 . "</h1>";
?>
<!-- Write php inside html tags -->
<h1 style="color: palegreen;">
my real name is <?php echo $name1; ?>
</h1>
<h2 style="color: <?php echo $h2_color; ?>">this is first <?php echo $name1 ?> </h2>
<h2 style="color: <?php echo $h2_color; ?>">this is first </h2>
<h2 style="color: <?php echo $h2_color; ?>">this is first </h2>
<h2 style="color: <?php echo $h2_color; ?>">this is first </h2>
<h2 style="color: <?php echo $h2_color; ?>">this is first </h2>
<h2 style="color: <?php echo $h2_color; ?>">this is first </h2>
<h2 style="color: <?php echo $h2_color; ?>">this is first </h2>