Advertisement
quantim

WebDev 1 - HTTP/HTML Basics

Apr 22nd, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. Go here to edit HTML
  2. http://jsfiddle.net/WW3bh/
  3.  
  4. Query Parameters:
  5. http://www.host.com/?key1=value1&key2=value2
  6.  
  7. URL Fragments are not sent to the server for processing. They are used to reference the page you are looking at:
  8. http://www.example.com/foo?p=1#fragment
  9.  
  10. Full URL:
  11. <protocol>://<host>:<port>/<server-page>/?<query-param_1>=<query-value_1>&...<query-param_n>=<query-value_n>#<fragment>
  12. protocol = {http, ftp, https}
  13.  
  14. HTTP GET:
  15. If you are connected to:
  16. http://example.com/foo/logo.png?p=1#tricky
  17. you are issuing the following GET request to the server (remember Fragments are client side):
  18. GET /foo/logo.png?p=1 HTTP/1.1
  19.  
  20. Common HTTP Headers:
  21.  
  22. HTTP Status Codes:
  23. 2xx Success
  24. 3xx Redirection (but request still completed)
  25. 4xx Client Error
  26. 5xx Server Error
  27.  
  28. Making HTTP Requests through Telnet (remember, GET / HTTP/1.1 requests the root filesystem):
  29. $ telnet www.google.com 80
  30. Trying 54.149.114.8...
  31. Connected to apollo-mesos-elb-berlioz2-prod-885022263.us-west-2.elb.amazonaws.com.
  32. Escape character is '^]'.
  33. GET / HTTP/1.1
  34. Host: www.google.com
  35.  
  36.  
  37.  
  38. Some common Tags:
  39. <!DOCTYPE html> <!-- HTML5 Doctype -->
  40. <html>
  41. <head>
  42. <!-- meta-data, CSS, JS, Title -->
  43. </head>
  44. <body>
  45. <b>Bold text</b>.
  46. <br/>
  47. <i>Italicised</i>.
  48. <br/>
  49. <s>Strike through</s>.
  50. <br/>
  51. <a href="http://www.google.com">derp</a>
  52. <img src="http://iconogen.com/images/computer.png" alt="Computer"/>
  53. <p>This is block text</p>
  54. <span>This is inline text.</span>
  55. <div>
  56. This is block text.
  57. </div>
  58. </body>
  59. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement