Closed Thread
Thread Tools Search this Thread
Unread 3rd Jun 2015, 11:25 AM   #1
Internet Marketing Newbie
 
Join Date: 2014
Location: ARLINGTON, TX
Posts: 228
Thanks: 50
Thanked 5 Times in 5 Posts
Default
html vs php
Share on: 
fb share twitter share gplus share more share

<section id="primary" class="content-area">
<div id="content" class="site-content" role="main">


this is html syntax correct? or is it php?

TaherSyed34
TAHERSYED34 is offline  
Unread 3rd Jun 2015, 12:39 PM   #2
Internet Consultant
War Room Member
 
artemis360's Avatar
 
Join Date: 2009
Location: Las Vegas, NV
Posts: 105
Thanks: 76
Thanked 17 Times in 17 Posts
Blog Entries: 1
Default
Re: html vs php
Share on: 
fb share twitter share gplus share more share

It's often used together with CSS

A r t e m i s
------------
Webtopias.com
Artemis360.com
artemis360 is offline  
The Following User Says Thank You to artemis360 For This Useful Post:
Unread 3rd Jun 2015, 10:54 PM   #3
Internet Marketing Newbie
 
Join Date: 2014
Location: ARLINGTON, TX
Posts: 228
Thanks: 50
Thanked 5 Times in 5 Posts
Default
Re: html vs php
Share on: 
fb share twitter share gplus share more share

Originally Posted by artemis360 View Post

It's often used together with CSS
oh wait....even if the file name says .php???

TaherSyed34
TAHERSYED34 is offline  
Unread 4th Jun 2015, 12:52 AM   #4
Active Warrior
 
Daniel Santos's Avatar
 
Join Date: 2011
Location: Neither here nor there
Posts: 58
Thanks: 3
Thanked 13 Times in 10 Posts
Default
Re: html vs php
Share on: 
fb share twitter share gplus share more share

Originally Posted by TAHERSYED34 View Post

<section id="primary" class="content-area">
<div id="content" class="site-content" role="main">


this is html syntax correct? or is it php?
That particular snippet of code is HTML. PHP code would be contained within the PHP tag which opens with <?php and closes with ?>. For example, within your html you might find something as such:

<!DOCTYPE html>
<html>
<body>

<?php
echo "Hello world!";
?>

</body>
</html>
Daniel Santos is offline  
Unread 4th Jun 2015, 04:52 PM   #5
Active Warrior
War Room Member
 
Join Date: 2009
Location: Houston, Texas
Posts: 77
Thanks: 4
Thanked 11 Times in 10 Posts
Default
Re: html vs php
Share on: 
fb share twitter share gplus share more share

HTML is a tag language it's not a programming language. It's mostly open this close that <body> </body>... HTML is used more for the structure, look, design.

If you need actual programming, dynamic websites then that's where php comes in. PHP is what you would use to take what user is doing and using code do that command. EX:

Here's how a login page would look with html / php.
- Webpage loads
- HTML & CSS display how the page looks.
- Within this page is a login box that shows email address and password.
- You, the user, enter your email address and password and press enter.
- The php code takes this information and checks with the database to see if the information is valid.
- If information is correct then the php code sends sends you to the members area and creates session to remember that you are a member (so that it doesn't keep asking you over and over).

Not necessarily in that order but you get what I mean.

Oh and btw what you entered is HTML. If you keep scrolling in the code you'll see a </section> followed by a </div> and if it's properly commented then it'll tell you that this section ends here and this div ends here.
samntly is offline  
Unread 4th Jun 2015, 07:53 PM   #6
Bananas are Yellow!
Registered Member
War Room Member
 
David Beroff's Avatar
 
Join Date: 2013
Location: Wyoming, PA, USA
Posts: 1,046
Thanks: 2,549
Thanked 1,600 Times in 928 Posts
Blog Entries: 4
Default
Re: html vs php
Share on: 
fb share twitter share gplus share more share

Originally Posted by TAHERSYED34 View Post

oh wait....even if the file name says .php???
Right. As I tried to describe before, you'll typically flow back and forth between HTML and PHP in the same file, depending on what you're doing. Your filename extension will be .php, but it usually doesn't make sense to just stay in one or the other. I posted a real-world example for you earlier so you could see how this back-and-forth works when you're actually trying to do something, rather than just run simple examples. I think it would be helpful for you to walk through that code and get a general understanding of when it's using which and why.

In order to learn this stuff better, you'll have to actually get your hands dirty and jump in and write some code!

Put MY voice on YOUR video: AwesomeAmericanAudio.com
David Beroff is offline  
The Following User Says Thank You to David Beroff For This Useful Post:
Unread 5th Jun 2015, 04:03 AM   #7
HostBudget
 
hostbudget's Avatar
 
Join Date: 2014
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: html vs php
Share on: 
fb share twitter share gplus share more share

It is a html code with css attachment. It is not a PHP code.

HostBudget : Budget web hosting solutions. Pure SSD Disks. 24X7 Live support
hostbudget is offline  
Unread 5th Jun 2015, 05:06 AM   #8
E commerce web Services
 
nicholas28's Avatar
 
Join Date: 2013
Location: NORTH WALES, PA 19454
Posts: 11
Thanks: 0
Thanked 3 Times in 3 Posts
Default
Re: html vs php
Share on: 
fb share twitter share gplus share more share

Its HTML Tag including PHP,CSS

Because class and ID is coming on PHP part and < >

Gowebbaby Provide 360° Result Driven Web Design Services, ECommerce Websites, Online Marketing & Mobile App Development With Guaranteed Web Visitors.
Hire interactive eCommerce developer and designer for Magento, Amazon Webstore and Wordpress or any CMS of your choice.
nicholas28 is offline  
Unread 5th Jun 2015, 05:11 AM   #9
www.proxy-n-vpn.com
 
seven4's Avatar
 
Join Date: 2015
Posts: 230
Thanks: 0
Thanked 19 Times in 18 Posts
Default
Re: html vs php
Share on: 
fb share twitter share gplus share more share

Originally Posted by TAHERSYED34 View Post

<section id="primary" class="content-area">
<div id="content" class="site-content" role="main">


this is html syntax correct? or is it php?
This is pure html code.

seven4 is offline  
Unread 8th Jun 2015, 11:02 AM   #10
Warrior Member
 
ShreyaSharma's Avatar
 
Join Date: 2015
Location: france
Posts: 18
Thanks: 9
Thanked 2 Times in 2 Posts
Default
Re: html vs php
Share on: 
fb share twitter share gplus share more share

Html Vs Php:
1.Html is a language used to describe how to display text in a web browser or in a browser window where as Php is a scripting language and can be used to create webpage written in html.

2.Html works on Client Computer where as php runs on Server side.

3.Html is amarkup language used to create static webpage where as php is a programming language used to make the html page dynamic.

ShreyaSharma is offline  
Unread 9th Jul 2015, 11:59 AM   #11
Warrior Member
 
Join Date: 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: html vs php
Share on: 
fb share twitter share gplus share more share

Originally Posted by nicholas28 View Post

Its HTML Tag including PHP,CSS

Because class and ID is coming on PHP part and < >

That's right it is HTML code the "id" and "class" serve CSS ...or/and javascript purposes and a .php file could contain no less than all of them javascript, php, html, css languages

My personal domain, where together with some friends, web developpers students, like I, get to practice developping personal / small enterprise's websites, the tip-welcome way (english and french speaking). We ain't senior developers but we really love what we do: xpres-o.com.
Anne85 is offline  
Closed Thread


Bookmarks

Tags
html, php

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 04:36 PM.