HTML & CSS Cheat Sheet

About

For the time being, I am keeping track of HTML and CSS information that I am struggling with or just need reminders on occasionally. Things I feel comfortable with will not be included at this time.

HTML

Tag Description
<h1-6> Used as headings and subheadings for a webpage.
<img> Embeds an image into the webpage (src, alt)
<link> Self-closing. Links other files to this one (rel, href)
<!-- --> Comment formatting.
<tr> Used within a <table> element. Adds a new row to the table. <th> and <td> are used within this.
<th> Used within a <table> element. Defines a header for table rows or columns.
<td> Used within a <table> element. Adds data to the table.
<thead> Used within a <table> element. Groups the header content in a table together.
<tbody> Used within a <table> element. Groups the body content in a table together.
<main> Specifies the main content of the document.
<section> Specifies a section with a specific topic.
<article> Specifies information that can be standalone.
<aside> Specifies content that is separate or a side-note to the main content of the page.
<figure> Contains media content that can be grouped together with other information like <figcaption>
<figcaption> Used within a <figcaption> element. Specifies a caption to the corresponding media.

CSS

Property Description
color Defines text color. Use names, #HexCodes, hsla(), rgba()
display Defines how an element is displayed. Use inline, block, or inline-block
position Defines different ways for an element to be positioned. Frequently used in conjunction with other CSS properties like top, left, right, bottom to further specify. Use absolute, fixed, relative, sticky, static.
@font-face Allows you to create a "custom font" from local files. Specified as @font-face {font-family, src}
overflow Defines how content reacts when overflowing its container. Use hidden, clip, scroll, auto, visible.