Skip to main content

Tentative Final Exam Reference Sheet

INFO 1300, Fall 2026

This reference sheet is tentative and may change. The final version will be provided with the final exam.

HTML Reference​

Document metadata​

ElementDescription
<link>Specifies relationships between the current document and an external resource.
<meta>Represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style>, and <title>.
<title>Defines the document's title that is shown in a browser's title bar or a page's tab.

Content sectioning​

ElementDescription
<article>Represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable.
<aside>Represents a portion of a document whose content is only indirectly related to the document's main content.
<footer>Represents a footer for its nearest ancestor sectioning content or sectioning root element.
<header>Represents introductory content, typically a group of introductory or navigational aids.
<h1>, <h2>, <h3>, <h4>, <h5>, <h6>Represent six levels of section headings. <h1> is the highest section level and <h6> is the lowest.
<main>Represents the dominant content of the body of a document.
<nav>Represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents.
<section>Represents a generic standalone section of a document, which doesn't have a more specific semantic element to represent it.

Text content​

ElementDescription
<blockquote>Indicates that the enclosed text is an extended quotation.
<div>The <div> HTML element is the generic container for content. It has no effect on the content or layout until styled in some way using CSS.
<hr>Represents a thematic break between paragraph-level elements: for example, a change of scene in a story, or a shift of topic within a section.
<li>Represents an item in a list. It must be contained in a parent element: an ordered list (<ol>), or an unordered list (<ul>).
<menu>A semantic alternative to <ul>. It represents an unordered list of items (which are represented by <li> elements).
<ol>Represents an ordered list of items — typically rendered as a numbered list.
<p>Represents a paragraph.
<ul>Represents an unordered list of items, typically rendered as a bulleted list.

Inline text semantics​

ElementDescription
<a>Together with its href attribute, creates a hyperlink to web pages, files, email addresses, locations within the current page, or anything else a URL can address.
<br>Produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the division of lines is significant.
<em>Marks text that has stress emphasis. The <em> element can be nested, with each nesting level indicating a greater degree of emphasis.
<span>The <span> HTML element is a generic inline container for phrasing content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang.
<strong>Indicates that its contents have strong importance, seriousness, or urgency.

Image and multimedia​

ElementDescription
<figure>Represents self-contained content, potentially with an optional caption.
<img>Embeds an image into the document. The src attribute is the URL of the image file.
<picture>Provides a container for images, allowing for responsive images that can adapt to different screen sizes and resolutions.
<source>Specifies an alternative image for <picture>. srcset is the image's URL; media is the media query for when to use it.

Interactive elements​

ElementDescription
<dialog>Represents a dialog box, such as a modal. Hidden until opened (e.g., with the open modal snippet), shown on top of the page.

Scripting​

ElementDescription
<script>Used to reference executable code, like JavaScript. Specify the src attribute to link an external script file.

CSS Reference​

Shape​

PropertyExample ValuesInher- ited
border1px solid black
none
No
border-top
border-right
border-bottom
border-left
2px dashed red
3px dotted blue
4px double green
5px groove orange
none
No
border-radius10px
50%
1em
No
list-style-typedisc
circle
square
decimal
none
Yes

Color​

PropertyExample ValuesInher- ited
colorred
blue
#ff0000
#0000ff
Yes
background-colorgreen
#008000
No

Typography​

PropertyExample ValuesInher- ited
font-familyArial
Georgia
'Times New Roman'
serif
sans-serif
monospace
Yes
font-weightnormal
bold
Yes
font-stylenormal
italic
oblique
Yes
text-decorationnone
underline
line-through
overline
No
font-variantnormal
small-caps
Yes
text-transformnone
uppercase
lowercase
capitalize
Yes
font-size16px
1em
large
small
Yes
text-alignleft
right
center
justify
Yes

Box Model​

PropertyExample ValuesInherited
margin10px (Notes: 10px all sides)
0 10px (Notes: 0 top/bottom, 10px left/right)
auto
No
padding10px (Notes: 10px all sides)
10px 20px (Notes: 10px top/bottom, 20px left/right)
No
border1px solid black
none
No
displayblock
inline
flex
none
No
width
min-width
max-width
100px
50%
auto
No
height
min-height
max-height
100px
50%
auto
No
box-sizingcontent-box
border-box
No

Flexbox​

PropertyInheritedExample Values
flex-directionNorowrow-reversecolumncolumn-reverse
flex-growNo012
orderNo012
gapNo010px
justify-contentNoflex-startcenterflex-endspace-between
align-itemsNostretchcenterflex-startflex-end
align-contentNostretchcenterflex-startflex-end
flex-wrapNonowrapwrapwrap-reverse

Images​

PropertyExample ValuesInherited
object-fitfill
contain
cover
none
No
object-positioncenter
top left
No
aspect-ratioauto
1 (Notes: square)
16 / 9
No

Media Queries​

FeatureExample Values
min-width400px
max-width800px
prefers-reduced-motionreduce
FeatureExample Values
prefers-contrastmore
less
prefers-color-schemedark
light
pointercoarse
fine

Utility Classes​

.accessible-hidden {
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}

JavaScript Snippet Reference​

TypeSnippetDescription
Eventevent: click elementWhen the user clicks/taps an element
Eventevent: page readyWhen the page finishes loading
Eventevent: resize browser windowWhen the browser window is resized
Eventevent: modal closedWhen a modal is closed (close button or Escape key)
Actionaction: add css classAdd a CSS class to an element
Actionaction: remove css classRemove a CSS class from an element
Actionaction: open modalOpen a <dialog> as a modal
Actionaction: close modalClose a modal <dialog>
Actionaction: debug console messageLog a message to the browser console
Ifif: browser narrow or wideCheck if the browser is narrow or wide
Ifif: element has css classCheck if an element has a specific CSS class
(useful for toggling a CSS class)