HTML5 Powered

Introduction

Ciprian Chichirita

ciprian.chichirita@tellence.net
Contents
  1. WWW - history
  2. How it works
  3. HTTP/S - protocol
  4. HTML - prerequisites
  5. HTML - page
  6. HTML - details
  7. To be continued...
WWW, the history

Uniform Resource Locators (URLs)

Browser, wget, cURL, cypress (headless browser), postman

World Wide Web

hypertext links

Internet

Tim Berners-Lee, CERN near Geneva, Switzerland

how it works

CLient --URL--> DNS

CLient <--SERVER ADDR-- DNS

CLient --REQUEST--> SERVER ADDR

CLient <--RESPONSE-- SERVER ADDR

localhost, 127.0.0.1, IPv4(192.168.0.1), IPv6(::1)

how it works: URL
  • URI (Uniform Resource Identifier)
  • scheme:[//authority]path[?query][#fragment]
  • http[s]://www.example.com:80[443]/main/index.html?first=true#top
  • http: OR https:
  • //www. or //subdomain.
  • domain example.com
  • port 80 or 443 (ICANN has IANA)
  • path "/main/index.html"
  • query "?first=true"
  • fragment "#top"
  • (hostname == domain name == canonical[according to the rules] name == origin)
HTTP/S, the protocol

http and https, application layer (Open Systems Interconnection - OSI LEVEL)

SSL, TLS, HTTP /2 - stateless protocol

TLS handshake

client -- TLS version, cryptographic alg, data compression methods --> server

client <-- cryptographic alg, session ID, server digital certificate, public key -- server

client -- verify server digital certificate --> Certificate Authorithy (CA)

client -- shared secret key encrypted with server public key --> server

client -- finished msg encrypted with shared secret key --> server

client <-- finished msg encrypted with shared secret key -- server

HTTP /x status codes

1xx (Informational): The request was received, continuing process

2xx (Successful): The request was successfully received, understood, and accepted

3xx (Redirection): Further action needs to be taken in order to complete the request

4xx (Client Error): The request contains bad syntax or cannot be fulfilled

5xx (Server Error): The server failed to fulfill an apparently valid request

HTTP METHODS

POST (C)

GET (R)

PUT (U)

DELETE (D)

html-prerequisites

simple web server: python -m SimpleHTTPServer 1337

python3 -m http.server 1337

Validate HTML: https://validator.w3.org/

Check if HTML feature can be used: https://caniuse.com/

HTML - page

								
							
HTML - details

									
								
https://www.w3schools.com/tags/tag_doctype.asp

HTML must-have tags (elements): html, head, body

attributes: src, href, lang, async, rel, target, custom-attr

src, href, lang, async, rel, target, custom attr

_blank, _self (default), href target

src path

"//" ("//cdn.example.com/") and "/" ("/html/index.html")

HTML - details

									
								

Meta tags

IE conditionals


									
								
HTML - character reference

									
								

HTML5 - new tags (some)

									
								

To be continued...

  • Forms
  • Table
  • Iframe
  • SVG & canvas
  • HTML5 custom elements
  • Homework

Homework
☐ If windows 10, install WSL so you can have python installed:
☐ Homework:
	☐ make a personal page that has:
	☐ a header with a image and text
	☐ a navigation bar that has 3 links:
		☐ home page
		☐ multimedia
		☐ contact
	☐ footer - where we will have contact info
	☐ pages:
		☐ home page: will have a table with your resume
		☐ multimedia: will have an embed youtube video, vimeo video, imgur image and a codepen
		☐ contact: will have a form with this fields:
			☐ name, email, subject, message, send button