I'm playing with controlling my blog display.
some code - the 'p' tag contains a style attribute specifying a monospace font-family.
So far so good. Specifically I used:
< p style="font-family:monospace;" > and < p style="text-indent: 1em;" >
I'm fairly happy with my code block above - I'm hoping to move the style to a class in the template for the blog, so that I can reuse it easily. I'll get to that in a bit. I'm less certain how, but I'd very much like an easy way to display html without faking it out by putting spaces between the '<' and tag name, not to mention embedding code (monospaced fonts at least) in paragraphs like this one. With time I suppose. I'm trying hard to write very very propper html, which in this case includes:
- properly ending all tags (even if it's not 'required') such as < p > ... < / p >
- < p > ... < / p >
- < br / >
- describing only structure, not formatting (that's what css is for, after all)
Since I'm posting using Opera, which doesn't (currently, at least) show some of the links (like preview), I'll just be posting stuff like this, and editing or deleting it as needed.
To summarize:
- extract common styles, like "code", into the blog template css (CHECK - see next post)
- display html code without faking it out using a space ( < br / > is annoying to write, and hard to read the html in the edit window (my current location), so I'd rather see something like {code} < html > {/code}) (CHECK - see link below)
- remember / look up the best html tags to use to embed monospace phrases (code snippets) in regular (non monospace) text. (CHECK - span tags work just fine)
- pray Shane doesn't read this, because I'll likely end up embarassed and give up. He knows about it, cuz he was looking over my shoulder.... (...)
Okay, I looked it up: to make html-appearing tags (so I can post html "code") I can use & lt ; to create < (see <p> ?)
Sadly, this requires irritatingly careful typing, or a quick program or script to convert it. It isn't too painful to think of writing my blogs in another editor, because this window is way too small, and I can barely see the "Publish Post" button. It's a start.
Here's a faster solution: convert html for display in html page.
A quick reference for myself:
- <
- >
- &
- ¢ (ok, really, when am I going to be using ¢? Or £ ¥ or € for that matter...)
- § (I like that one though... I should use it all the time on purpose...)
- ©
- ®
Inline code code code is here!
<span style="font-family: monospace;">code code code</span>
Leave one.