HTML
At a Glance
Starting from Scratch:
Alternatively, have your JS and CSS in external files:
HTML Basics
<a href="google.com">
: href is an attribute<img src="..." alt="sad cat in a box">
. Always put an alt attribute on img tags for accessibility reasons. Be descriptive of the intent of the image, but don't put "an image of...". Can use empty alt if the image is just decorative or doesn't provide meaning<input type="button" value="Click Me"/>
. However, make sure to explicitly declare type, otherwise it is assumed to be "submit". Also, some old browsers may not support the newer button tag and there may be security risks with the inner text<meta name="viewport" content="width=device-width, initial-scale=1" />
2021 Lily Peng