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
| Element | Description |
|---|---|
<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
| Element | Description |
|---|---|
<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
| Element | Description |
|---|---|
<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
| Element | Description |
|---|---|
<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
| Element | Description |
|---|---|
<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
| Element | Description |
|---|---|
<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
| Element | Description |
|---|---|
<script> | Used to reference executable code, like JavaScript. Specify the src attribute to link an external script file. |
CSS Reference
Shape
| Property | Example Values | Inher- ited |
|---|---|---|
border | 1px solid blacknone | No |
border-topborder-rightborder-bottomborder-left | 2px dashed red3px dotted blue4px double green5px groove orangenone | No |
border-radius | 10px50%1em | No |
list-style-type | disccirclesquaredecimalnone | Yes |
Color
| Property | Example Values | Inher- ited |
|---|---|---|
color | redblue#ff0000#0000ff | Yes |
background-color | green#008000 | No |
Typography
| Property | Example Values | Inher- ited |
|---|---|---|
font-family | ArialGeorgia'Times New Roman'serifsans-serifmonospace | Yes |
font-weight | normalbold | Yes |
font-style | normalitalicoblique | Yes |
text-decoration | noneunderlineline-throughoverline | No |
font-variant | normalsmall-caps | Yes |
text-transform | noneuppercaselowercasecapitalize | Yes |
font-size | 16px1emlargesmall | Yes |
text-align | leftrightcenterjustify | Yes |
Box Model
| Property | Example Values | Inherited |
|---|---|---|
margin | 10px (Notes: 10px all sides)0 10px (Notes: 0 top/bottom, 10px left/right)auto | No |
padding | 10px (Notes: 10px all sides)10px 20px (Notes: 10px top/bottom, 20px left/right) | No |
border | 1px solid blacknone | No |
display | blockinlineflexnone | No |
widthmin-widthmax-width | 100px50%auto | No |
heightmin-heightmax-height | 100px50%auto | No |
box-sizing | content-boxborder-box | No |
Flexbox
| Property | Inherited | Example Values | |||
|---|---|---|---|---|---|
flex-direction | No | row | row-reverse | column | column-reverse |
flex-grow | No | 0 | 1 | 2 | |
order | No | 0 | 1 | 2 | |
gap | No | 0 | 10px | ||
justify-content | No | flex-start | center | flex-end | space-between |
align-items | No | stretch | center | flex-start | flex-end |
align-content | No | stretch | center | flex-start | flex-end |
flex-wrap | No | nowrap | wrap | wrap-reverse |
Images
| Property | Example Values | Inherited |
|---|---|---|
object-fit | fillcontaincovernone | No |
object-position | centertop left | No |
aspect-ratio | auto1 (Notes: square)16 / 9 | No |
Media Queries
| Feature | Example Values |
|---|---|
min-width | 400px |
max-width | 800px |
prefers-reduced-motion | reduce |
| Feature | Example Values |
|---|---|
prefers-contrast | moreless |
prefers-color-scheme | darklight |
pointer | coarsefine |
Utility Classes
.accessible-hidden {
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}
JavaScript Snippet Reference
| Type | Snippet | Description |
|---|---|---|
| Event | event: click element | When the user clicks/taps an element |
| Event | event: page ready | When the page finishes loading |
| Event | event: resize browser window | When the browser window is resized |
| Event | event: modal closed | When a modal is closed (close button or Escape key) |
| Action | action: add css class | Add a CSS class to an element |
| Action | action: remove css class | Remove a CSS class from an element |
| Action | action: open modal | Open a <dialog> as a modal |
| Action | action: close modal | Close a modal <dialog> |
| Action | action: debug console message | Log a message to the browser console |
| If | if: browser narrow or wide | Check if the browser is narrow or wide |
| If | if: element has css class | Check if an element has a specific CSS class (useful for toggling a CSS class) |