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


this is html syntax correct? or is it php?
#html #php
  • Profile picture of the author artemis360
    It's often used together with CSS
    Signature

    A r t e m i s
    ------------
    Webtopias.com
    Artemis360.com

    {{ DiscussionBoard.errors[10095534].message }}
    • Profile picture of the author TAHERSYED34
      Originally Posted by artemis360 View Post

      It's often used together with CSS
      oh wait....even if the file name says .php???
      {{ DiscussionBoard.errors[10096347].message }}
      • Profile picture of the author David Beroff
        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!
        Signature
        Put MY voice on YOUR video: AwesomeAmericanAudio.com
        {{ DiscussionBoard.errors[10098292].message }}
  • Profile picture of the author Daniel Santos
    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>
    {{ DiscussionBoard.errors[10096519].message }}
  • Profile picture of the author samntly
    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.
    Signature

    Need A PHP Programmer That You Can Count On, That's Professional, Experienced in working with small and large clients. Reach me on skype at "Netlyte" or visit me at http://www.LCCWebDesign.com

    {{ DiscussionBoard.errors[10098080].message }}
  • Profile picture of the author hostbudget
    It is a html code with css attachment. It is not a PHP code.
    {{ DiscussionBoard.errors[10098853].message }}
  • Profile picture of the author nicholas28
    Its HTML Tag including PHP,CSS

    Because class and ID is coming on PHP part and < >
    {{ DiscussionBoard.errors[10098938].message }}
    • Profile picture of the author Anne85
      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
      {{ DiscussionBoard.errors[10159829].message }}
  • Profile picture of the author seven4
    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.
    {{ DiscussionBoard.errors[10098951].message }}
  • Profile picture of the author ShreyaSharma
    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.
    {{ DiscussionBoard.errors[10104123].message }}

Trending Topics