When writing my own posts I have been using
<> and inline code quotes) to refer to elements inline. I will sometimes add element after it as well (e.g.
<div> element). I think it makes it easier to read and stands out in titles better. If I'm just referring to what the element is, and it has an English word associated with it, I'll use that instead. Here's an example from a recent answer of mine:
If the image is just a way to make a button visually pleasing, use CSS
background-imageto style the
<button>(and don't use an
Here I referred to the image and the button, but when I got the the code part of it (assigning styles), I used the
<element> format. If it doesn't have a common English equivalent, like
<div>, I will always use the
<element> format. Pluralization can be awkward and I vary between:
My question is about editing other's posts. I don't usually edit posts just for formatting unless it's really bad, but when I do edit a post I try to fix all the formatting to at least be consistent across the post. I don't really want to impose my formatting preferences on posts I edit and would rather use a more standard and accepted method (which I'll happily adopt for my own posts) if one exists. I currently try to use what the OP used most often and format the rest to match.
I always want to change these (especially in titles):
- First letter capped (Div, Img)
- All caps (DIV, SPAN, P)
- Non-word elements with no
<>or code quotes (div, p)
Is there a preferred format for inline HTML?