Tag | Use |
---|---|
html | goes around everything, defines this as HTML content |
head | contains all of the dependencies and metadata of a page |
body | contains all of the visible content of a page |
Tag | Use |
---|---|
div | a block container (breaks the flow, nothing to the left or right) |
span | an inline container, good for adding attributes or styles to a few words in a larger context |
main | use once: reserved for the main content of your page |
header | use once: reserved for the banner nav at the top of a page |
footer | use once: reserved for the copyright and bottom nav of a page |
Tag | Use |
---|---|
p | "paragraph": adds line breaks above and below (block of text) |
a | "anchor": a link to another HTML page or another part of the page (#jump) |
img | "image": a picture, requires a src and an alt (no closing tag needed) |
Tag | Use |
---|---|
b | "bold" (you may also see <strong> ) |
i | "italics" (you may also see <em> ) |
Tag | Use |
---|---|
h1, h2, h3 | "heading": at different levels, like in an outline (you want one h1, and to descend in order ) |
ul, ol | lists: ordered (with numbers) or unordered (with bullets) |
li | "list item": a single item of a list |
details, summary | a collapsible section, with summary being the content of the button that reveals the rest of the content |