In [18]:
import requests
#r = requests.get('https://api.github.com/events')
# r.text
In [16]:
import requests
payload = {'key1': 'value1', 'key2': 'value2'}
r = requests.post("http://httpbin.org/post", data=payload)
print(r.text)
r.url # note that the payload hasn't been dropped in to the url.
Out[16]:
<input>type<input type="text"> or simply <input> is a standard textbox. This can also have a value attribute, which sets the initial text in the textbox.<input type="password"> is similar to the textbox, but the characters typed in by the user will be hidden.<input type="checkbox"> is a checkbox, which can be toggled on and off by the user. This can also have a checked attribute (<input type="checkbox" checked> - the attribute doesn’t require a value), and makes the initial state of the check box to be switched on, as it were.<input type="radio"> is similar to a checkbox, but the user can only select one radio button in a group. This can also have a checked attribute.<input type="submit"> is a button that when selected will submit the form. You can control the text that appears on the submit button with the value attribute, for example <input type="submit" value="Ooo. Look. Text on a button. Wow">.In general don't do the first two.
To add an external stylesheet to your html insert the following into the head
<link rel="stylesheet" href="style.css">
Eg.
<!DOCTYPE html>
<html>
<head>
<title>CSS Example</title>
<link rel="stylesheet" href="style.css">
body {
font-size: 14px;
color: navy;
}
Check out Adobe color wheel for a sweet color tool.
Demo: https://jsfiddle.net/p6mmct3z/
Demo with some css: https://jsfiddle.net/p6mmct3z/2/
Work up to challenge 6: https://en.wikiversity.org/wiki/Web_Design/CSS_challenges
In [ ]: