Basic HTML Template

For a web page to validate at the W3C it meeds a minimum of of the following code in it. The DOCTYPE defines the version of HTML being used, in this case HTML 5. In between the two html tags is the HTML code with the language defined as English. The head tag contains tags and information that typically does not display in the web page, but is meta information. The contents of a web page are largely contained in between the body tags. In this example, the web page would be blank (but would validate).

Example: Basic HTML Template


	<!DOCTYPE html>
	<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>HTML Example</title>
	</head>

	<body>

	
	</body>
	</html>
	

Validating Web Pages

The World-Wide-Web Consortium (W3C) is the International organization that creates the standards for HTML and other web development technologies. HTML is an interpreted language that the web browser will do its best to display the content correctly even if there are syntax mistakes in the code. The W3C, however, has an HTML validator that can be used to check for syntax errors in your HTML code, as well as look for accessibility issues, e.g. issues that impact individuals with disabilities, etc. The web site to the W3C HTML validator is below.

https://validator.w3.org/


Example: Basis HTML Page with Content

Below is an example of a basic web page with one line of output - a paragraph.


	<!DOCTYPE html>
	<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>HTML Example</title>
	</head>

	<body>

			<p>This is an example.</p>
	
	</body>
	</html>
	

Run it now

Results of this web page being validated at the W3C


Parts of an HTML Tag

Parts of an HTML Tag


Creating and Validating a Basic Web Page