Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

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.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <div class="wrapper">
  <h1 class="center st-word">Style the first word in any element</h1>
  <p class="center st-word">Just add the element class of "st-word"</p>

  <ul id="my-list">
    <li class="st-word">Enthusiastically monetize covalent infrastructures.</li>
    <li class="st-word">Seamlessly engineer excellent infrastructures.</li>
    <li class="st-word">Rapidiously implement state of.</li>
    <li class="st-word">Competently supply top-line products.</li>
    <li class="st-word">Holisticly evolve premier collaboration.</li>

  <p class="st-word">Energistically foster enterprise web services via distributed methods of empowerment. Holisticly re-engineer one-to-one materials after cross-media human capital. Continually plagiarize efficient.</p>

    <li class="st-word">Interactively orchestrate 24/365 ROI via.</li>
    <li class="st-word">Conveniently negotiate compelling meta-services and.</li>
    <li class="oops">OOPS! You forgot to add "st-word" Class to me!!.</li>
    <li class="st-word">Progressively maintain virtual portals before.</li>

<div class="footer">
  <h4 class="center">Designed && Coded By <span class="st-word">Ahmed Beheiry</span></h4>
              * { margin: 0; }

html, body { height: 100%; }

body {
  background: #f1f1f1;
  font-family: "Raleway", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 1px;

.wrapper {
  min-height: 100%;
	margin-bottom: -50px;
.wrapper:after {
  content: "";
  display: block;
  height: 50px; 

.center {text-align: center;}

.oops {font-weight: bold;}

p {
  width: 85%;
  margin: 10px auto;

h1 {
  margin-top: 0;
  padding-top: 40px;

.footer {
  height: 50px;
  line-height: 50px;
  background: #222;
  color: #fff;

/* Change the styles of the first word as you want ;) */
.first-word {
  color: #F44336;
  font-family: "Roboto", sans-serif;
  text-transform: uppercase;
              $(".st-word").each(function() {
  // Some Vars
  var elText,
      openSpan = '<span class="first-word">',
      closeSpan = '</span>';
  // Make the text into array
  elText = $(this).text().split(" ");
  // Adding the open span to the beginning of the array
  // Adding span closing after the first word in each sentence
  elText.splice(2, 0, closeSpan);
  // Make the array into string 
  elText = elText.join(" ");
  // Change the html of each element to style it
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.