Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

html5 in php hosting?

I am software engineering student. I want to setup a website using html5 and css3. I looked up various web hosting options. I want to use hosting that provides php and mysql, so that I can practice those as well. Will a hosting based on php and mysql provide support for html5 and css3? If yes, will the html5 code just be inserted into pages that are php extension?

I am very new to this, can some one please help.

Thanks.

like image 505
Mike Avatar asked Jun 16 '11 16:06

Mike


People also ask

Does PHP support HTML5?

You see PHP and HTML5 work together, PHP is a server-side scripting language while HTML5 is a browser-based markup language. In order to serve home pages or HTML files, the server needs a scripting language, this is where PHP comes in.

HOW include HTML in PHP?

The include (or require ) statement takes all the text/code/markup that exists in the specified file and copies it into the file that uses the include statement. Including files is very useful when you want to include the same PHP, HTML, or text on multiple pages of a website.

How does HTML interact with PHP?

If you want to represent web-pages, you need to use HTML markup. PHP is merely a programming language which is (in this context) used to dynamically generate HTML markup. So, if you request a PHP file, and expect a web-page in return, the PHP script has to generate the HTML markup and send it in the response.

Why PHP is not working in HTML?

So as you can see, by default, PHP tags in your . html document are not detected, and they're just considered plain text, outputting without parsing. That's because the server is usually configured to run PHP only for files with the . php extension.


2 Answers

HTML and CSS of ANY version are just plain text. Any language that can generate/consume plain text can work with either of them. You can do an entire dynamic website using bash scripts or a compiled C program if you wish. PHP just happens to be a bit more efficient at text handling than either of those. But it's not the only thing that can generate a page.

HTML is not "code". It's "markup", same for CSS.

like image 134
Marc B Avatar answered Oct 20 '22 19:10

Marc B


Right, HTML5 and CSS3 are not handled by your host, they are rendered on the client side, so every host allows you to use them. You can write HTML5 and CSS3 into PHP files directly and they will be rendered as if they were HTML files, with the advantage of being able to use PHP on those pages.

When buying servers you are buying space on the company's computers and for them to maintain your files, not deal with client-side rendering.

like image 32
Tom Walters Avatar answered Oct 20 '22 19:10

Tom Walters