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


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <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