COMP10001 Lecture Notes - Lecture 9: Html, Meta Element, Hostname
![](https://new-preview-html.oneclass.com/P39wlKzyDB5qj2bZOlarjdnRobAW4M0g/bg1.png)
Used to address machines
-
Each device has a unique IP address
-
Represented as 4 "8
-
bit" integers, each in the range [0, 255]
-
Statically
-
an IP is reserved for a given device
○
Dynamically
-
an IP is allocated to a device when it connects to the Internet
○
Allocated to a device
-
IPs:
Used to address machines as well
-
Made up of letters and full stops
-
Structured hierarchically relative to a domain name and end with a top
-
level domain
-
Resolve to IP addresses via the Domain Name System (DNS) using name servers
-
Hostnames:
21 = FTP
○
25 = outgoing mail (SMTP)
○
80 = HTTP
○
110 = incoming mail (POP3)
○
Machines communication via a collection of numbered ports
-
Applications and Ports:
Internet resources are addressed via Uniform Resources Locators (URLs)
-
Scheme = the protocol for accessing the file
○
Hostname = the device the file lives on
○
Port = access port (optional)
○
Path = where the file lives on the device
○
In the form scheme://hostname:port/path
-
URLs:
Primary language used to mark
-
up web documents is Hypertext Markup Language (HTML)
-
Made up of elements which are used to mark
-
up content
-
Empty elements = backslash at end of tag
○
Tag pairs = backslash at start of closing tag
○
Tags are enclosed in angle brackets and take the form of
-
Tags may contain attributes
-
<i></i> = italics
○
<b></b> = bold
○
<u></u> = underline
○
Basic textual tag pairs
-
<!DOCTYPE html>
○
<html>
○
<head>
○
</head>
○
<body>
○
</body>
○
</html>
○
Document structure
-
Often contains a title (<title></title>
○
Often contain meta
-
data as attributes to empty meta elements
The head
-
HTML:
Week 9
Saturday, 5 May 2018 5:27 PM
Foundations of Computing Page 1