Getting to Know the Raspberry Pi – Session 5 – July 20, 2020

In this session, we installed the Apache web server, learned some basic HTML, and a tiny bit of Javascript. We also used the chrome/chromium developer tools to find errors in our javascript.

Our first file was to demonstrate some very simple HTML with paragraphs and different header tags:

<html>
	<head>
		
	</head>
	<body>
	<h1>This is a Header 1</h1>
	<p>This is a paragraph inside header 1</p>
	
	<h2>Header 2</h2>
	<h3>Header 3</h3>
	
	</body>

</html>

Our next file was an HTML file with embedded javascript:

<html>
<head>
</head>
<body>
	<h1 style="color:green;">Getting to Know the Raspberry Pi</h1>	

	<p>Enter your name in the textbox: </p>		

	<input type="text" id="myText" value="Enter your name">		

	<button type="button" onclick="myFunction()">Click Me! /button>
		
	<p id="HelloYou"></p>

	<script>
		function myFunction(){
		 var x = document.getElementById("myText").value;
		 document.getElementById("HelloYou").innerHTML="Hello " + x;
		}
			
        </script>
</body>
</html>