CSS : CSS 代表级联样式表,它是一种样式表语言,用于塑造将在浏览器中显示为网页的 HTML 元素。通过使用 CSS,使用 HTML 创建的网站将看起来很有吸引力。基本上,CSS 为任何 HTML 元素提供了外壳。如果您将 HTML 视为网页的骨架,那么 CSS 将是骨架的皮肤。 CSS 的 Internet 媒体类型(MIME 类型)是 text/CSS。
示例:此示例描述了简单 CSS 的使用。 CSS 已与样式标签内的 HTML 一起使用。
HTML
Geeksforgeeks
A computer science portal for geeks
PHP
输出:
PHP : PHP代表超文本预处理器。 PHP是一种服务器端脚本语言(基于脚本的程序),用于开发 Web 应用程序。它可以嵌入到 HTML 中,适用于创建动态网页和数据库应用程序。它被视为一种仁慈的语言,具有与 MySQL、Oracle 和不同数据库有效交互的能力。 PHP的主要目标是允许 Web 开发人员快速创建动态生成的页面。
例子:
PHP
输出:
Welcome to GFG!
CSS 和PHP 的区别:
SR.NO | CSS | PHP |
1. | CSS represents the style and the appearance of content like font, color, margin, padding, etc. | PHP is used for server-side programming which will interact with databases to retrieve information, storing, email sending, and provides content to HTML pages to display on the screen. |
2. | It is developed by Hakon Wium Lie, Bert Bos. | It is developed by Rasmus Lerdorf. |
3. | It is very easy to learn. | PHP is easy to learn but not as much as CSS. |
4. | It does not provide responsive pages or websites. | It provides responsive pages or website. |
5. | Its codes are static. | Its codes are dynamic. |
6. | It is used for front-end development | It is used for server-side development. |
7. | It can be used in a PHP file. | It can’t be used in a CSS file. |
8. | It currently working on CSS3 which is the latest version of CSS. | It’s currently working on PHP7.0 which is the latest version of PHP. |
9. | It works on the look of the website. | It adds dynamic content to websites to make them look good. |
10. | Extensions of CSS are .CSS, .CSS3. | Extensions of PHP are .php, .php3, .php4, .php7. |