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 Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
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.
<dl class="accordion">
<dt><a>Drama, Music and Screen <span>more details
»</span></a></dt>
<dd style="display: none;" class="">
<p><img alt="Sarah Jane Dickenson" title="Sarah Jane Dickenson" src="https://www2.hull.ac.uk/fass/images/2013627.00-18.009.0030.00-drama_helen_v_150sq.jpg" class="">The School of Drama, Music and
Screen at the University of Hull is committed to providing a
student experience which is second to none, students have the
opportunity to develop both practical skills and intellectual
understanding to a very high level. Our graduates often go on to
become highly-regarded professionals in the cultural industries, in
education and in related professions.<br></p>
<p><br>
<a class="button" href="/fass/drama-1.aspx">Drama Website</a>
<a class="button" href="/fass/music-1.aspx">Music Website</a>
<a class="button" href="https://www2.hull.ac.uk/fass/film-studies.aspx">Film
Studies</a></p>
</dd>
<dt><a>English<span>more details »</span></a></dt>
<dd style="display: block;" class="active">
<p><img alt="Module information" title="Module information" src="https://www2.hull.ac.uk/fass/images/2013627.00-18.009.0030.00-module_logo_v_150sq.jpg" class="">Hull's Department of English has reason to be
proud of its reputation. In the last Research Assessment Exercise
of 2008 ninety per cent of our research in the English submission
was awarded an international profile, and 55% of our submission
was ranked in the top two categories of
'internationally excellent' and 'world class'</p>
<p><br>
<a class="button" title="Visit the English Website" href="/fass/department_of_english.aspx">English Website</a></p>
</dd>
<dt><a>History<span>more details »</span></a></dt>
<dd style="display: none;">
<p><img alt="Family tree scroll" title="Family tree scroll" src="https://www2.hull.ac.uk/fass/images/2013627.00-18.009.0030.00-history_home2_v_150sq.jpg" class="">If you are interested in studying history
across a wide range of topics and periods, in small groups with
enthusiastic teachers, then the Department of History is the place
for you. Our 30 members of staff are active historians working on
everything from ancient Rome to modern Britain</p>
<p><br>
<a class="button" title="Visit the History website" href="https://www2.hull.ac.uk/fass/department-of-history.aspx">History Website</a></p>
</dd>
<dt><a>The Law School<span>more details »</span></a></dt>
<dd style="display: none;">
<p><img alt="MA in International Law and Politics" title="MA in International Law and Politics" src="https://www2.hull.ac.uk/fass/images/2013627.00-18.009.0030.00-law_mallet_large_v_150sq.jpg" class="">The Law School is the longest
established department within the University of Hull, which started
life as the University College, Hull. The Law School was
established in October 1927 with an initial intake of fourteen
students preparing for their professional examinations.</p>
<p><br>
<a class="button" title="Visit the Law School Website" href="https://www2.hull.ac.uk/fass/law-school.aspx">Law School Website</a></p>
</dd>
<dt><a>Languages, Linguistics and Cultures<span>more details
»</span></a></dt>
<dd style="display: none;">
<p><img alt="flags" title="flags" src="https://www2.hull.ac.uk/fass/images/hu-languages100421036_v_150sq.jpg" class="">The Department offers different types of Single Honours and
Joint Honours Programmes, which combine language study with modules
in social and political history, literature, film, drama, art and
other options. All programmes include a year abroad except our BA
in Modern Languages.</p>
<p><br>
<a class="button" title="Visit Languages" href="/fass/school-of-languages,-linguisti.aspx">Languages Website</a> <a class="button" title="Visit American Studies" href="https://www2.hull.ac.uk/fass/american-studies.aspx">American
Studies Website</a></p>
</dd>
<dt><a>Politics, Philosophy and International Studies<span>more
details »</span></a></dt>
<dd style="display: none;">
<p><img alt="ME MAP" title="ME MAP" src="https://www2.hull.ac.uk/fass/images/me%20map_v_150sq.jpg" class="">Independent surveys show that the Department of Politics
and International Studies is one of the finest in the UK. Its
student centred approach, range of courses, staff expertise and
employer networks combine to make it a student destination which is
second to none. In 2010, the Times Good University Guide ranked the
department 11th out of 69.</p>
<p><br>
<a class="button" title="Visit the Politics Website" href="https://www2.hull.ac.uk/fass/politics-and-international-stu.aspx">Politics Website</a> <a class="button" title="Visit the Philosophy Website" href="https://www2.hull.ac.uk/fass/philosophy.aspx">Philosophy
Website</a></p>
</dd>
<dt><a>Social Sciences<span>more details »</span></a></dt>
<dd style="display: none;">
<p><img alt="Keyboard with Gender Keys" title="Keyboard with Gender Keys" src="https://www2.hull.ac.uk/fass/images/2013627.00-18.009.0030.00-genderkeys_v_150sq.jpg" class="">We are a multidisciplinary Department of
Social Sciences with a distinctive profile of teaching and research
that brings together a world class staff with expertise in
Anthropology, Criminology, Gender Studies, Social Policy &
Social Justice, Sociology, Media and Social Work.</p>
<p><br>
<a class="button" title="Visit the Social Sciences Website" href="https://www2.hull.ac.uk/fass/social-sciences.aspx">Social Sciences Website</a> <a class="button" title="Visit Religion" href="https://www2.hull.ac.uk/fass/religion.aspx">Religion
Website</a></p>
</dd>
<dt><a>Scarborough School of Arts and New Media<span>more details
»</span></a></dt>
<dd style="display: none;">
<p><img alt="Drama and English" title="Drama and English" src="https://www2.hull.ac.uk/fass/images/2013627.00-18.009.0030.00-drama_english_v_150sq.jpg" class="">The School of Arts and New Media (SANM), based
at the Scarborough Campus, encourages students to explore and
contribute to the future of computing and digital media through a
range of undergraduate and postgraduate opportunities</p>
<p><br>
<a class="button" title="Vist the SANM Website" href="/fass/fass/departments/sanm.aspx">School of Arts and New Media Website</a></p>
</dd>
<dt><a>Part-time Provision Office<span>more details
»</span></a></dt>
<dd style="display: none;">
<p><img alt="Andrea Parker, part-time LLB student" title="Andrea Parker, part-time LLB student" src="https://www2.hull.ac.uk/fass/images/2013627.00-18.009.0030.00-parker_a_med_v_150sq.jpg" class="">The Part-time Provision Office is a friendly
and informal unit that works hard to forge close links with its
students. It is not part of a conventional department and exists
purely to offer a range of programmes tailored for open-access
part-time students. The programmes offer a variety of interesting
pathways for local students who wish to study part-time while
working</p>
<p><br>
<a class="button" href="/fass/faculty_of_arts__social_scien/part-time_provision_office.aspx">Part-time provision
Website</a></p>
</dd>
</dl>
body {
padding: 50px;
font-family: "arial";
font-size: 13px;
line-height: 1.6;
}
a {
color: #a22;
}
a.button {
color: #fff;
background: #a22;
padding: 8px 15px;
border-radius: 3px;
text-decoration: none;
}
dl {
margin-bottom: 15px;
width: 95%;
}
dd {
width: 100%;
padding: 15px;
margin-bottom: -1px;
border: 1px solid #ccc;
border-top: none;
float: left;
background: #fff;
border-radius: 0 0 3px 3px;
}
dd img {
float: right;
margin: 3px 3px 3px 15px;
box-shadow: 0px 0px 5px #ccc;
padding: 7px
}
dt a {
display: inline-block;
cursor: pointer;
width: 100%;
border: 1px solid #ccc;
background: url(https://www2.hull.ac.uk/fass/Files/BG-deptdt.gif) 0 0 repeat-x;
margin-bottom: -1px;
padding: 10px 15px;
text-decoration: none!important;
}
dt a:hover,
dt a:focus {
background: #eee;
}
a.deptLink {
float: right;
width: 201px; /* width of image */
padding:1px;
border: 1px solid #ccc;
margin: 2px 0 10px 10px;
text-align: center;
text-decoration: none;
}
a.deptLink:hover,
a.deptLink:focus {
border-color: #A02720;
}
dt span {
float: right;
color: #888;
text-shadow: 1px 1px 1px #fff;
font-size:90%;
}
$(document) .ready(function($) {
var allPanels = $('.accordion > dd').hide();
$('.accordion > dt > a').click(function() {
$this = $(this);
$target = $this.parent().next();
if(!$target.hasClass('active')){
allPanels.removeClass('active').slideUp();
$target.addClass('active').slideDown();
}
return false;
});
})(jQuery);
Also see: Tab Triggers