PHP & HTML
Moderator: General Moderators
PHP & HTML
Can i use html elements in a .PHP document? if so, do the rules change?
Re: PHP & HTML
Yes and no.
But I have no idea what you're talking about.
But I have no idea what you're talking about.
Re: PHP & HTML
okay, i want to create a php document in dreamweaver 8. can i start off my html code in a php document the same way i would if i was using a html document?
this is what i have so far. this is a php document and i added elements the same way i would in a html document. i have not put php scripts in yet but would there be a problem doing so?
this is what i have so far. this is a php document and i added elements the same way i would in a html document. i have not put php scripts in yet but would there be a problem doing so?
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title></title>
<link href="untitled.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style2 {font-family: Impact}
.style3 {font-family: "You Are Loved"}
.teez_links_T_Blue {color: #04187d}
-->
</style>
</head>
<body>
<div id="container">
<div id="links">
<div align="center"><span class="style3"><span class="teez_links_T_Blue">T</span>eez<span class="teez_links_T_Blue">T</span>oo.Com</span> <span class="style1 style2">Home | Previous Weeks | Contact | Associates</span> </div>
</div>
<div id="bigbanner"><img src="" alt="" name="bigbanner" width="800" height="333" id="bigbanner" style="background-color: #999999" /></div>
</div>
</body>
</html>
Last edited by Benjamin on Mon Jun 28, 2010 6:14 am, edited 1 time in total.
Reason: Added [syntax=php] tags.
Reason: Added [syntax=php] tags.
Re: PHP & HTML
There are only two(ish) requirements:
- The file has a .php extension
- PHP code and only PHP code comes between a "<?php" opening tag and a "?>" closing tag
Beyond that you're (almost) free to do whatever you want.
- The file has a .php extension
- PHP code and only PHP code comes between a "<?php" opening tag and a "?>" closing tag
Beyond that you're (almost) free to do whatever you want.
Re: PHP & HTML
Thanks! Just wanted to make sure. I'm learning php on my own and not through school so I just wanted to make sure.