Special codes for paragraph styles

This is so cool I just decided to make a post out of it so other bloggers can use it to customize the paragraph style in their own blogs—without spending money.

I’ve been paying $15 a year to get my posts to tab in the first line of each paragraph, as books and magazines do, instead of leaving a blank between them as web pages do by default. In other words, I prefer this:

“Your G string is flat,” Ted said.

“I beg your pardon?”

“Your third string. It’s flat. Tune it, or I’m packing up my guitar and going home. This sounds like my third grade orchestra class. Do you want to borrow my tuner?”

“Oh—sure. Thanks.”

…instead of this:

“Your G string is flat,” Ted said.

“I beg your pardon?”

“Your third string. It’s flat. Tune it, or I’m packing up my guitar and going home. This sounds like my third grade orchestra class. Do you want to borrow my tuner?”

“Oh—sure. Thanks.”

Not everyone agrees with me. It’s a crotchet of mine that I was willing to spend the money to fix.

Now, however, I’ve discovered a simple way to do this in both WordPress and Blogspot, for free. If you’re interested, I’ve put the codes below and simple instructions for using them in the new-post editor.

The simplest way:

  1. Start a new post. (Keep these instructions open in another tab of your browser for reference.)
  2. Select the “HTML” editor (in Blogspot it’s called “Edit Html”).
  3. Copy this code from here and paste it into the empty post:
    <p style="text-indent:.3in;margin:0;">
  4. After the code, type a few words of your first paragraph.
  5. Switch to the “Visual” editor (in Blogspot it’s called “Compose”).
  6. Finish the paragraph and hit “Enter” to make a new paragraph. The editor will keep using the same style for the rest of the post, automatically duplicating the style code at the start of each paragraph.

(A slightly less simple way is to use the HTML editor all the time and paste the code in front of each paragraph. You can edit old stories, for example, and just paste the code in at the beginning of each paragraph, then save.)

That’s for the “story” paragraph style. If you’re doing a play, which uses “hanging” indent, or a poem with long lines that may wrap and you want the wrapped lines indented, the process is the same except that you use this code instead:
<p style="text-indent:-.5in;margin:0 0 0 .5in;">

(Here is a later post with several other useful style codes.)

Drop me a note if you have questions.

Advertisements

About Greg Bryant

I teach writing and literature at Highland Community College in northeast Kansas.
This entry was posted in odds & ends. Bookmark the permalink.

11 Responses to Special codes for paragraph styles

  1. Aaron Fisher says:

    Greg – you could also put that in a stylesheet so that every paragraph in your posts would automatically appear that way. I’m not very familiar with WordPress but I guarantee you it’s an easy change. Let me know if you want to give that a shot sometime :-)

    • Aaron Fisher says:

      Again, not familiar with WP, but if it allows you the ability to edit the Theme stylesheet, try putting this at the bottom of it:

      div.entry-content p { text-indent:.3in; margin:0; }

      • Greg Bryant says:

        The way the CSS feature works in WordPress is you get to create a supplementary CSS form. The basic style sheet for the blog (I use “Twenty-Ten”) is not accessible, but by paying the fee you can either define codes to supersede those or opt to replace the standard code altogether. I like Twenty-Ten, but I like literature to look like it does in play scripts and novels, and for “Ringtones” I needed a device to help the reader visualize two separate conversations going on simultaneously, so I bought the service.

        I’m not sure all those style features in “Ringtones” could be done with inline codes. I know it doesn’t let you put a <STYLE></STYLE> section in the post itself. I tried that. It just deletes it.

        If you wanted to play around with it you could easily and for free start a WordPress blog. If you discover a way around this stuff, I’d be happy to try it. I’m not afraid of HTML and CSS coding. In fact I’d like to learn more about it. Here is a page where I’ve been messing around with the HTML5 features outside the WP environment, including @font-face, which is really cool, though IE (of course) requires special coddling and coaxing, and they’ve been slow and spotty at implementing the HTML5 standard at all.

      • Aaron says:

        For the @font-face stuff, check out http://www.fontsquirrel.com/fontface/generator. You can upload fonts, and it creates all the versions and stylesheet stuff you need for full browser compatibility. One of my favorite sites, and they have a nice collection of free fonts that aren’t hideous.

    • Greg Bryant says:

      Yes, WordPress lets you customize the style sheet. I’ve done that, and I’ve used it for all kinds of effects not available in the standard editor. Here‘s an example. If you view the source you can see what I’m doing. The trouble is, it costs me $15 a year for the privilege of editing CSS. I may keep paying it, because it does mean I can just put in a <div id="play"> code at the beginning and all the paragraphs will be understood that way, and also there are some features that would be impossible to do with inline style codes, but I am sorely tempted to save the money and use the codes. How cheap am I?

  2. Aaron says:

    Gotcha – I wasn’t sure if the free hosted WP would let you do that kind of stuff or not. I’ve helped a couple friends install/move/configure wordpress sites, but those were all full installs and covered the extent of my experience with it.
    I’ll start account tomorrow and see if I can find any free “hacks”; I hate paying fees I don’t have to as well.

    • Greg Bryant says:

      Especially paying to use CSS. It’s not like they invented it or anything.

      • Aaron says:

        Greg – I see what you mean. I created a free WP blog, and they’ve got that thing locked down tight. Your solution is probably the best free one out there. Nice job :)

  3. bryon says:

    This couldn’t be any easier when you’ve got CSS access, so I did it. It made my fiction and essays look a lot better. Unfortunately, the law of unintended consequences bit hard and fast: it also indented the first lines of all 172 of my haiku. The new coding came out and it’s all flush left again.

    • Greg Bryant says:

      I can show you how to set up the CSS so you can invoke a different genre in each post if you want. Just let me know. After setting up the CSS, all you have to do is put a simple code at the beginning and end of each post, like this:

      <div id="story">

      Once upon a time… (etc.)

      </div>

      Same for poems. If you leave out the <div> tags, it simply uses the standard flush left with a break between paragraphs.

  4. bryon says:

    I’d be happy to take you up on that offer.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s