Difference between revisions of "Including a file"

From Conservapedia
Jump to navigation Jump to search
(oops, all PHP lines must end with a semi-colon)
m (more computer tips)
Line 16: Line 16:
 
==Notes==
 
==Notes==
 
<references />
 
<references />
 +
[[Category:Computer tips]]

Revision as of 14:43, August 8, 2011

Including a file in source code is a very common practice, especially in web page design. However, there are so many ways to do this, that it can be hard for the beginner to keep track.

CSS in HTML

<link rel="stylesheet" type="text/css" href="class.css" />[1]

Javascript in HTML

<script src="myscript.js"></script>

PHP

include 'NiceScript.php';
include 'anything.html';

Notes