HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<div class="editor-wrap">
<textarea id="editor">
<h1><span class="mce-annotation tox-comment" data-mce-annotation-uid="mce-conversation_39124539331662741473397" data-mce-annotation="tinycomments">Assignment</span> #3: Color Theory</h1>
<p>Hello {{Student.Name}},</p>
<p>For this week's assignment, you will learn the basics of color theory.</p>
<p>Select one of the following topics, and write a research essay. Ensure you answer the questions in full, and provide references for any primary or secondary sources<sup id="footnote_83179098411662742784603" class="mce-footnote"><a href="#footnotes_entry_83179098411662742784603">1</a></sup> consulted. Contact {{Course.Teacher.Name}} or {{Course.Department.Head}} if you have any questions about the assignment.</p>
<div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 56.25%; max-width: 800px;" data-ephox-embed-iri="https://www.youtube.com/watch?v=Qj1FK8n7WgY"><iframe style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;" src="https://www.youtube.com/embed/Qj1FK8n7WgY?rel=0" scrolling="no" allowfullscreen="allowfullscreen"></iframe></div>
<h2>This week's tasks</h2>
<p>Begin by watching the video above then proceed to the assignment questionnaire by pressing continue below.</p>
<h3>Topic List</h3>
<ul>
<li>The origin of Color theory and its effect on emotion and mood is contentious.<sup id="footnote_98446634721662742994322" class="mce-footnote"><a href="#footnotes_entry_98446634721662742994322">2</a></sup> Identify your understanding of the originators of Color theory. Argue for the effectiveness of certain color palettes over others to create different moods.</li>
<li>While some experts argue there are no new color palettes, others argue innovation is a constant process. Choose one side, and build an argument: There are no new color palette innovations. New color palette innovations are happening all the time.</li>
<li>Select three examples of color theory in practice that are all part of one medium (e.g. film, magazine, television). Explain why these three examples are effective. Contrast and argue why one of these examples is more effective in its use of color theory concepts compared to the others.</li>
<li>Wassily Kandinsky states “Color is a power which directly influences the soul.”<sup id="footnote_34341905131662743043554" class="mce-footnote"><a href="#footnotes_entry_34341905131662743043554">3</a></sup> Explain what Kandinsky meant, and provide an argument explaining what Kandinsky means using color theory principles.</li>
</ul>
<h3>Also...</h3>
<ul>
<li>Think about the difference between mixing colors using colored lights vs using paint.</li>
<li>Pay extra attention to the different complementary color models.</li>
</ul>
<blockquote>
<p>“Color is a power which directly influences the soul.”<br><span style="color: #95a5a6;"><em>– Wassily Kandinsky </em></span></p>
</blockquote>
<h2>Deadlines</h2>
<p>Please submit your tasks before {{Assignment.DueDate}}</p>
<h2>Grading Criteria</h2>
<table style="border-collapse: collapse; width: 99.8698%; height: 157px;" border="1">
<thead>
<tr>
<th style="width: 18.0915%;" scope="col"> </th>
<td style="width: 18.0915%;" scope="col">High Achievement</td>
<td style="width: 18.2224%;" scope="col">Good Achievement</td>
<td style="width: 18.2224%;" scope="col">Pass</td>
<td style="width: 18.2224%;" scope="col">Fail</td>
</tr>
</thead>
<tbody>
<tr>
<th style="width: 18.0915%;" scope="col">Demonstrated knowledge of color theory</th>
<td style="width: 18.0915%;">The student shows an outstanding knowledge and command of color theory concepts</td>
<td style="width: 18.2224%;">The student shows good knowledge and understanding of color theory concepts</td>
<td style="width: 18.2224%;">The student shows some knowledge of color theory and a basic understanding of color theory concepts</td>
<td style="width: 18.2224%;">The student has not demonstrated knowledge of color theory, or the concepts of color theory.</td>
</tr>
<tr>
<th style="width: 18.0915%;" scope="col">Argument composition skills</th>
<td style="width: 18.0915%;">The student shows an outstanding argument composition skills</td>
<td style="width: 18.2224%;">The student shows good argument composition skills</td>
<td style="width: 18.2224%;">The student shows some argument composition skills.</td>
<td style="width: 18.2224%;">The student does not show clear argument composition skills</td>
</tr>
<tr>
<th style="width: 18.0915%;" scope="col">Consulted resources</th>
<td style="width: 18.0915%;">The student shows they have consulted excellent resources</td>
<td style="width: 18.2224%;">The student has consulted good resources</td>
<td style="width: 18.2224%;">The student has consulted some resources required for the assignment</td>
<td style="width: 18.2224%;">The student has not consulted adequate resources</td>
</tr>
<tr>
<th style="width: 18.0915%;" scope="col">Writing, Grammar, and Clarity</th>
<td style="width: 18.0915%;">The student shows a command of the language in their work</td>
<td style="width: 18.2224%;">The student shows effective writing skills</td>
<td style="width: 18.2224%;">The student shows clear writing skills</td>
<td style="width: 18.2224%;">The student shows unclear writing skills</td>
</tr>
</tbody>
</table>
<p> </p>
<div class="mce-footnotes">
<hr>
<ol>
<li id="footnotes_entry_83179098411662742784603"><a class="mce-footnotes-backlink" href="#footnote_83179098411662742784603">^ </a><span class="mce-footnotes-note">AMA Style Guide. <a href="https://owl.purdue.edu/owl/research_and_citation/ama_style/index.html">https://owl.purdue.edu/owl/research_and_citation/ama_style/index.html</a>. Accessed September 9, 2022. </span></li>
<li id="footnotes_entry_98446634721662742994322"><a class="mce-footnotes-backlink" href="#footnote_98446634721662742994322">^ </a><span class="mce-footnotes-note">Color theory. Wikipedia. <a href="https://en.wikipedia.org/wiki/Color_theory">https://en.wikipedia.org/wiki/Color_theory</a>. Published September 3, 2022. Accessed September 24, 2022. </span></li>
<li id="footnotes_entry_34341905131662743043554"><a class="mce-footnotes-backlink" href="#footnote_34341905131662743043554">^ </a><span class="mce-footnotes-note">Kandinsky W. A quote from concerning the spiritual in art. Goodreads. <a href="https://www.goodreads.com/quotes/90420-colour-is-a-power-which-directly-influences-the-soul">https://www.goodreads.com/quotes/90420-colour-is-a-power-which-directly-influences-the-soul</a>. Accessed September 14, 2022. </span></li>
</ol>
</div><!--tinycomments|2.1|data:application/json;base64,eyJtY2UtY29udmVyc2F0aW9uXzM5MTI0NTM5MzMxNjYyNzQxNDczMzk3Ijp7InVpZCI6Im1jZS1jb252ZXJzYXRpb25fMzkxMjQ1MzkzMzE2NjI3NDE0NzMzOTciLCJjb21tZW50cyI6W3sidWlkIjoibWNlLWNvbnZlcnNhdGlvbl8zOTEyNDUzOTMzMTY2Mjc0MTQ3MzM5NyIsImF1dGhvciI6ImF2aXNtYXJhIiwiYXV0aG9yTmFtZSI6IkFuZ2VsIFZpc21hcmEgKFN0dWRlbnQpIiwiYXV0aG9yQXZhdGFyIjoiaHR0cHM6Ly93d3cudGlueS5jbG91ZC9pbWFnZXMvYXZhdGFycy9hdmF0YXItQW5nZWxWaXNtYXJhLmpwZyIsImNvbnRlbnQiOiJIb3cgd291bGQgeW91IGxpa2UgdXMgdG8gY2l0ZSBvdXIgcmVmZXJlbmNlcz8iLCJjcmVhdGVkQXQiOiIyMDIyLTA5LTA5VDE2OjM3OjUzLjM5N1oiLCJtb2RpZmllZEF0IjoiMjAyMi0wOS0wOVQxNjozNzo1My4zOTdaIn0seyJ1aWQiOiJtY2UtcmVwbHlfNzYwNTE3MDY2MjE2NjI3NDE1Njg0NzEiLCJhdXRob3IiOiJybWFydGVsIiwiYXV0aG9yTmFtZSI6IlJvc2FsaW5hIE1hcnRlbCAoSW5zdHJ1Y3RvcikiLCJhdXRob3JBdmF0YXIiOiJodHRwczovL3d3dy50aW55LmNsb3VkL2ltYWdlcy9hdmF0YXJzL2F2YXRhci1Sb3NhbGluYU1hcnRlbC5qcGciLCJjb250ZW50IjoiUGxlYXNlIHVzZSB0aGUgYnVpbHQtaW4gZm9vdG5vdGVzIGZ1bmN0aW9uYWxpdHkgYW5kIGZvbGxvdyBBTUEgc3R5bGUuIiwiY3JlYXRlZEF0IjoiMjAyMi0wOS0wOVQxNjozOToyOC40NzFaIiwibW9kaWZpZWRBdCI6IjIwMjItMDktMDlUMTY6Mzk6MjguNDcxWiJ9XX19-->
</textarea>
</div>
body {
margin: 60px 16px;
background-color: #fafafc;
color: #222f3e;
}
.editor-wrap {
max-width: 1200px;
margin: auto;
}
tinymce.init({
// Select the element(s) to add TinyMCE to using any valid CSS selector
selector: "#editor",
// Tip - To make TinyMCE leaner, only include the plugins you need
plugins:
"a11ychecker advcode autocorrect autolink autoresize autosave charmap checklist code emoticons footnotes fullscreen image link linkchecker lists media mediaembed mergetags powerpaste preview table tableofcontents tinycomments tinymcespellchecker typography wordcount",
// Specify the toolbar buttons
// We have put our custom insert token button last
// https://www.tiny.cloud/docs/tinymce/6/toolbar-configuration-options/
toolbar:
"undo redo | blocks | bold italic underline strikethrough forecolor backcolor | align checklist bullist numlist | link image media footnotes mergetags table | subscript superscript charmap blockquote | tokens | spellchecker typography a11ycheck wordcount | addcomment showcomments | fullscreen preview",
// Enable sticky toolbar
// https://www.tiny.cloud/docs/tinymce/6/menus-configuration-options/#toolbar_sticky
toolbar_sticky: true,
// Disable the status bar
// https://www.tiny.cloud/docs/tinymce/6/statusbar-configuration-options/#statusbar
statusbar: false,
// You can assign each item in the Blocks menu a user-friendly name
// https://www.tiny.cloud/docs/tinymce/6/user-formatting-options/#block_formats
block_formats:
"Title=h1; Heading=h2; Sub heading=h3; Blockquote=blockquote; Paragraph=p",
// Use font_css to load custom fonts from an external source
// https://www.tiny.cloud/docs/tinymce/6/add-css-options/#font_css
font_css: [
"https://fonts.googleapis.com/css2?family=Asap:ital,wght@0,400;0,550;1,400&display=swap"
], // URLs containing commas and such have to be wrapped in an array to work
// The following css will be injected into the editor, extending
// the default styles.
// In a real world scenario, with much more custom styles for headings
// links, tables, images etc, it's recommended to use the content_css
// option to load a separate CSS file. Makes editing easier too.
// https://www.tiny.cloud/docs/tinymce/6/add-css-options/
content_style: `
body {
max-width: 800px;
margin: auto;
font-family: 'Asap', serif;
font-size: 17px;
color: #222f3e;
}
h1, h2, h3, strong {
font-weight: 550;
}
table th,
table thead td {
background-color: #ecf0f1;
font-weight: 550;
text-align: left;
}
table caption {
display: none;
}
table[data-mce-selected="1"] caption {
display: table-caption;
}
.mce-footnotes {
font-size:12px;
}
`,
// Set Enhanced Media Embed's max width
// https://www.tiny.cloud/docs/tinymce/6/introduction-to-mediaembed/
mediaembed_max_width: 800,
});
Also see: Tab Triggers