EN
XHTML - basic XHTML 5 template
0
points
For each project, the basic XHTML5 template looks always in the following way.
1. Only body
element example
// ONLINE-RUNNER:browser;
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
Web page content here...
</body>
</html>
2. body
+ script
element example
// ONLINE-RUNNER:browser;
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<script>
// script here
</script>
</body>
</html>
3. head
+ body
elements
Example 1
// ONLINE-RUNNER:browser;
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- head tags here... -->
</head>
<body>
Web page content here...
</body>
</html>
Example 2
// ONLINE-RUNNER:browser;
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
/* style here */
</style>
<script>
// script here
</script>
</head>
<body>
Web page content here...
</body>
</html>
Example 3
// ONLINE-RUNNER:browser;
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Example template</title>
<link rel="stylesheet" href="path/to/my/styles.css" />
<script type="text/javascript" src="path/to/my/script.js"></script>
</head>
<body>
<p>Web page text...</p>
</body>
</html>
Example 4
// ONLINE-RUNNER:browser;
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta charset="utf-8" />
<title>Example template</title>
<meta name="description" content="Example template description." />
<meta name="author" content="dirask.com" />
<link rel="stylesheet" href="path/to/my/styles.css" />
<style>
/* Place for styles */
</style>
<script type="text/javascript" src="path/to/my/script.js"></script>
</head>
<body>
<p>Web page text...</p>
<script>
alert('Hello world!');
</script>
</body>
</html>