在XHTML中,可否同時使用PHP,CSS,Javascript......

2008-03-24 11:57 pm
例如:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">



<head>
<link type="text/css" rel="stylesheet" href="CSS 放置處.css" />
<script type="text/javascript" src="JavaScript 放置處.js"></script>
</head>
更新1:

什麼是xhtml dtd and syntax???

更新2:

但聽人講,話PHP , ASP , VB 和 JAVA不能一齊在HTML上使用?? 係咪真的???

回答 (1)

2008-03-25 11:20 am
✔ 最佳答案
Yes, you can as long as you conform to the xhtml dtd and syntax.


2008-03-25 23:20:04 補充:
DTD is short for Document Type Definitions
DTD specify the rules that apply to the markup of documents of a particular type, including a set of element and entity declarations.
An XHTML DTD describes in precise, computer-readable language, the allowed syntax and grammar of XHTML markup.

2008-03-25 23:22:41 補充:
Some of the XHTML syntax rules:
Attribute names must be in lower case
Attribute values must be quoted
Attribute minimization is forbidden
The id attribute replaces the name attribute
The XHTML DTD defines mandatory elements

2008-03-26 23:56:36 補充:
php, asp(vb), jsp(java) 是server script,由server執行,html同xhtml是client script,由browser來執行,兩者是没有衝突的。server script可以output html code,只要html 符合xhtml syntax 便没有問題。


收錄日期: 2021-04-25 20:32:39
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080324000051KK01959

檢視 Wayback Machine 備份