HTML5 Syntax
Before we show examples and discuss the new content tags available to us using HTML5, let's take a look at changes to the syntax of HTML in this new revision. They have removed the need for long references to a DTD in the doctype, and removed the need to specify extra information when establishing connection to external files or when establishing the encoding type of the document. You will notice that all of these now require less information in order to pass as valid HTML5 mark-up.
HTML5 DOCTYPE TAG:
HTML5 CHARACTER ENCODING:
HTML5 LINK TAG:
HTML5 SCRIPT TAG:
An example of these things all together in a web document:
HTML5 DOCTYPE TAG:
HTML CODE EXAMPLE
<!DOCTYPE html>
HTML CODE EXAMPLE
<meta charset="UTF-8">
HTML CODE EXAMPLE
<link rel="stylesheet" href="style/style.css">
HTML CODE EXAMPLE
<script src="myFile.js"></script>
HTML CODE EXAMPLE
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="style/style.css">
<script src="myFile.js"></script>
<title>My Web Page</title>
</head>
<body>
<header>Welcome to My Page Friends</header>
</body>
</html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="style/style.css">
<script src="myFile.js"></script>
<title>My Web Page</title>
</head>
<body>
<header>Welcome to My Page Friends</header>
</body>
</html>
click here to code.
0 Response to "HTML5 Syntax"
Post a Comment