-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.html
83 lines (82 loc) · 3.91 KB
/
main.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>cat photo app</title>
</head>
<body>
<main>
<h1>CatPhotoAPP</h1>
<section>
<h2>cat photos</h2>
<!-- target "_blank" opens a new tab -->
<p>See more <a href="https://freecatphotoapp.com" target="_blank">cat photos</a> in our gallery.</p>
<a href="https://freecatphotoapp.com">
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back">
</a>
</section>
<section>
<h2>Cat Lists</h2>
<h3>Things cats love</h3>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<!--figure element formats contents on page-->
<figure>
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate">
<!--figurecaption gives figure contents a sun heading-->
<figcaption>Cats <em>love</em> lasagna</figcaption>
</figure>
<h3>Top 3 things cats hate:</h3>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<figure>
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg" alt="Five cats looking around a field.">
<figcaption>Cats <strong>hate</strong> other cats</figcaption>
</figure>
</section>
<section>
<h2>Cat Form</h2>
<form action ="https://freecatphotoapp.com/submit-cat-photo">
<!-- "fieldset" element used to create sections within a form
similar to the "sections" element or "article" element but specifically within a form-->
<fieldset>
<!--legemd element gives fieldset a caption-->
<legend>Is your cat an indoor or outdoor cat?</legend>
<!--label element pairs input button and indoor text as one -->
<label>
<!--setting "type" attriute as "radio" as there is only one option to choose from -->
<!--giving both input buttons the same name means only one can be selected at a time-->
<input checked id="indoor" type="radio" name="indoor-outdoor" value="indoor"> Indoor
</label>
<label>
<input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor
</label>
</fieldset>
<fieldset>
<legend>What's your cat's personality?</legend>
<!-- setting "type" attribute as "checkbox" as there are multiple checkboxes to choose from-->
<!--By giving label element a for attribute == to input id "loving" is associated with input element-->
<input checked id="loving" type="checkbox" name="personality" value="loving">
<label for="loving">Loving</label>
<input id="lazy" type="checkbox" name="personality" value="lazy">
<label for="lazy">Lazy</label>
<input id="energetic" type="checkbox" name="personality" value="energetic" >
<label for="energetic">Energetic</label>
</fieldset>
<input type="text" name="catphotourl" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</section>
</main>
<footer>
<p>No Copyright - <a href="https://www.freecodecamp.org">freeCodeCamp.org</a></p>
</footer>
</body>
</html>