#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    3
    Rep Power
    0

    Can All Be Used At Once?


    Can you use PHP, HTML, jQuery, and CSS on one page?

    For example, PHP and HTML for the page content, and jQuery and CSS for the menus?
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    Yes, virtually all web sites use all four technologies on every page, although not necessarily PHP for the server-side.

    jQuery is a library, not a language; JavaScript is the language.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,127
    Rep Power
    4304
    Each of those technologies have different purposes. HTML gives structure to a document and gives meaning to the different parts (e.g. this part is a heading, this other part is a list, this is a quote, etc.). CSS allows you to control presentation, how the HTML document looks. JavaScript is used to add interactivity to the page between full page loads (e.g. do something when the user types something or moves the mouse cursor over an element). PHP (or the server-side language of your choice) allows you to output code in the other aforementioned languages dynamically, so that you can do things like keep common parts of the pages in different pages for easier maintenance, process form submissions, and retrieve content from a database.

    So, yes, menus often use both CSS and JavaScript (on top of the HTML foundation), but simple ones can be made without JavaScript.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo