Click Me!
Click Me!
<html>
<body>
<h2>HTML Forms</h2>
<form action="/action_page.php">
First name:<br>
<br>
Last name:<br>
<br><br>
</form>
<p>If you click the "Submit" button, the form-data will be sent to a page called "/action_page.php".</p>
</body>
</html>
<html>
<body>
<video width="320" height="240" controls>
</video>
<p><strong>Note:</strong> The video tag is not supported in Internet Explorer 8 and earlier versions.</p>
</body>
</html>
Article Tag
<!DOCTYPE html>
<html>
<body>
<article>
<h1>Google Chrome</h1>
<p>Google Chrome is a free, open-source web browser developed by Google, released in 2008.</p>
</article>
<p><strong>Note:</strong> The article tag is not supported in Internet Explorer 8 and earlier versions.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
#Header {
background-color: lightblue;
color: black;
padding: 40px;
text-align: center;
</style>
</head>
<body>
<h2>The id Attribute</h2>
</body>
</html>
A nested to p
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
OL tag
<!DOCTYPE html>
<html>
<body>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ol start="50">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
Action tag
<!DOCTYPE html>
<html>
<body>
<form action="/action_page.php">
</form>
<p>Click the "Submit" button and the form-data will be sent to a page on the server called
"/action_page.php".</p>
</body>
</html>
<form action="/submit-cat-photo">
<input type="text" placeholder="cat photo URL">
</form>
Button tag
<button type="submit">Submit</button>
Label tag
<br /br>
<label for="loving"><input id="loving" type="checkbox"
name="personality">Loving</label>
<br /br>
<label for="caring"><input id="caring" type="checkbox"
name="personality">caring</label>
<br /br>
<label for="cute"><input id="cute" type="checkbox"
name="personality">Cute</label>
Note that CSS is case-sensitive so be careful with your capitalization. CSS has been
adopted by all major browsers and allows you to control:
color
fonts
positioning
spacing
sizing
decorations
transitions
There are three main ways to apply CSS styling. You can apply inline styles directly to
HTML elements with the styleattribute. Alternatively, you can place CSS rules
within styletags in an HTML document. Finally, you can write CSS rules in an external
style sheet, then reference that file in the HTML document. Even though the first two
options have their use cases, most developers prefer external style sheets because they
keep the styles separate from the HTML elements. This improves the readability and
reusability of your code. The idea behind CSS is that you can use a selector to target an
HTML element in the DOM (Document Object Model) and then apply a variety of
attributes to that element to change the way it is displayed on the page.
In this section, you'll see how adding CSS styles to the elements of your CatPhotoApp
can change it from simple text to something more.
CSS
<h2 style="color: blue;">CatPhotoApp</h2>