What-does-it-mean questions:
Go to Wikipedia and check the answers to the following questions. We will discuss them next day in class.
- What does RAM mean? What is it? How is it relevant for a computer?
- What does CPU mean? What is the role of a CPU in a computer?
- What does MHz mean? If we had two computers, one running at 1MHz and other at 10MHz, what would be the mmain difference we would notice?
- 1GHz is 1000 times as much as 1MHZ. My computer CPU runs at 2.6GHz. How much faster is it than the ZX80?
Basic structure of a web page
HTML language
HTML is a tagging language -not really a programming language.
HTML consists of
HTML Element
An HTML Element consists of an opening tag and a closing tag which usually surround a
Symbolically we may write this as: <tag></tag>. Let's see in detail how this looks.
Example of an HTML Element: <a href="http://www.google.com">Google</a> Where:
- a is the Name of this HTML Element
- href="http://www.google.com" altogether is an example of an Attribute of this HTML Element
- href is the Name of the attribute, and...
- "http://www.google.com" is the Value of the attribute.
Web page
A web page consists of just two HTML Elements:
- The document type specification: <!doctype html>
- The document content: <html> </html>
Hello World page
Copy paste the following code into your text editor and save it as helloworld.html. Then open it with your browser. This corresponds to the minimum tags needed to write a web page conforming to the HTML5 standard.
<!doctype html >
<html>
<head>
<title>My first web page
</title>
<meta charset="utf-8">
</head>
<body>
<Hello World!>
</body>
</html>
Conclusions
As you may notice, this very same page where you are reading all this has almost no embelishment and a very, very simple layout.
We are only using bold face, emphasis, different headers (h1, h2, h3 and h4) and lists to give this content a minimum of visual layout.
In the first part of this course we will see how to make visually impacting pages that help us highlight the main points and make it much more visually appealing to read.
Exercise 1:
Write the "Hello World!" example on a text file and save it as "helloworld.html". Then open it with Firefox or Chrome.
You should see a window with the title "My first web page" and with a content of only "Hello World!".
Exercise 2:
Go to Wikipedia and read about the story of Sinclair ZX80 and the Sinclair ZX Spectrum. Both were little computers manufactured by Sinclair Ltd..
Write a web page with a litle summary (No more than 5 sentences. E.g., when did they come out? how much RAM did they have?) of the history of the Sinclair ZX80 and ZX Spectrum as a web page. Save it on a file called "sinclair.html". Hint: Take the hello world example and substitute the body content with your summary. Call the title "Sinclair"
You should see a window with the title "Sinclair" and with your summary as content.