danotto Posted January 24, 2009 Report Share Posted January 24, 2009 hey guys! i recently go very much into web design. im gonna spent 2 days learning html css, and then im gonna move on to php. i wanted to ask, when u code in php, you embed it in html. but can php like write html pages? or like do u design the page with html and css and put some javascript into it, and embed php to hand forms and stuff? for example would i write an entire page of php which is instructed to display a page with html? its cuz the w3schools and php.net tutorials only show (i read like the sections where they show how to manage loops variables funcions, like the first sections) script stuff, and those dont tell you how to code php in a way that it displays pages with images and photoshop graphics in the background. or do i have it all wrong? Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 25, 2009 Report Share Posted January 25, 2009 OK... If you really are new to web design, you really need to spend more than just two days trying to learn this stuff. Realistically, I'd suggest working on it for two weeks to a month before you move on to PHP. Although PHP is completely separate, it really helps to have a strong understanding of HTML and CSS. As far as your PHP question goes, PHP can do either. You could use PHP to actually create full pages (using HTML and CSS), or just use little snippets of PHP within your html. It mostly depends on what you are trying to achieve. A couple useful PHP resources: http://www.killerphp.com http://www.phpvideotutorials.com http://nettuts.com/ Quote Link to comment Share on other sites More sharing options...
Wickham Posted January 25, 2009 Report Share Posted January 25, 2009 (edited) It's very flexible, you can do all the ways you suggested. Most pages are a basis of HTML 4.01 (or XHTML 1.0) with CSS, then may have javascript parts inside and may also have parts PHP coded like a header or form processing, etc. Pages need a .html extension with or without javascript but must have a .php extension if there is any PHP. You can have a page that is all PHP, for instance a php include for doctype, html tags and head section, and other php includes for the header, content, menu and footer so that nothing on the page is outside a php include, but this is unusual. Falkencreative beat me by a few minutes I must type quicker. Edited January 25, 2009 by Wickham Quote Link to comment Share on other sites More sharing options...
danotto Posted January 25, 2009 Author Report Share Posted January 25, 2009 and would i use javascript or php to to display nice menus with fancy color? for example:http://nehe.gamedev.net/ Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 25, 2009 Report Share Posted January 25, 2009 and would i use javascript or php to to display nice menus with fancy color? for example:http://nehe.gamedev.net/ Most likely, that will be Javascript. PHP works more behind the scenes, Javascript can provide effects directly on the page. Quote Link to comment Share on other sites More sharing options...
jlhaslip Posted January 26, 2009 Report Share Posted January 26, 2009 The only thing your Browser understands is HTML and CSS to style the page. PHP is used at the Server to write the html for your page. Javascript is used by the Browser to do things local to the Browser. Often your page uses a combination of all three ( Html / Css / Php ) to create a dynamic web site with local enhancements by javascript. All 4 are very powerfull and they each have their advantages. i also agree that it will take longer than 2 days to learn all you need to know about html/css before tackling php. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.