Skip to content

HTML hints

the prof

When you do a page or post, you probably use the “Visual” tab, which presents an array of options for formatting text. It’s also possible to click on the “HTML” tab and manually insert code.

The system recognizes paragraphs automatically, but I have set up a tag to give a consistent appearance (font, font size, margins between paragraphs, and an initial capital). To insert it go to the “Text” tab and put <p class=”base”> at the start of each paragraph. While not necessary, good form is to end each paragraph with </p>. Note this is the general for of “tabs” for web pages. The principle modifier is of the form <tag class=”class name“> at the start and </tag> at the end.

Site-specific formats:

    • for your by-line (right alignment): <p class=”rt”>

test of right alignment

  • for a double-indented paragraph (for a quote): <div class=”dblin”>
This is a test of the double-indent function. You can also use options not shown. Here’s an example example that changes the font, the font size and the font color with the <span>text to change</span> tag pairing. Here the closing tag is mandatory. As an example, <span style=”font-size: 85%; color: green; font-family: cursive;”> gives this sort of text</span>. WordPress is picky, if you leave out the closing quote mark, strange things happen.
Next, there’s a way to create a hanging indent, such as for a bibliography, but you have to open and close with the following tag set. I have used it to format this paragraph so that you can see what happens:
<div class=”in”> and close with </div>.

I’ve set up the following tags, which I use in various spots. The class names aren’t always the most convenient, because I set them up while doing other pages on this web site.

  • <p class=”head”> makes a centered header
  • <p class=”subhead”> makes the indented header that I use on the Vlasic pages
  • <p class=”base”> is the standard format.

Be First to Comment

Leave a Reply