Most website back-end systems have a HTML display option in the text editor which enables you to switch from the plain text mode to the back-end code – here is where you can see why things are being displayed the way they are.
<p> comes in handy particularly when you’re trying to cut and paste text from another source – you’ll often see the text has been transferred across with weird formatting or fonts and you want to fix it. If you can’t find a solution in your normal editing option, switch to HTML, change the opening code for each paragraph to <p> (and make sure you close it with </p>) and it’ll be fixed.
It doesn’t solve all coding errors, but it’s definitely handy to know.
2. Centre it up
Another common annoyance is trying to get embedded images, videos or social media posts to display in the centre of the screen. Sometimes you can use the centre orientation option in your text editor, sometimes you can choose to centre it as a display option – but if neither of those options work, go to the HTML code and enter this at the start of the relevant section:
<div align=center>
It’s important to note the American spelling of ‘center’ here. You then go to the end of the relevant code for content you want displayed in the middle and close off the section with </div> and there you have it. Easily fixed.
The <div> tag assigns a division of the code, enabling you to block together a segment within the <div> and </div> codes.
3. Spaced out
Paragraphs looking weird? Not formatting how you’d like?
Most times, if you use the <p> parameter and include spaces in between you can solve your spacing woes – but here’s another one. If you enter <p> </p> between the test you want to break up, it’ll insert a line between the text.
‘nbsp’ stands for non-breaking space, which represents an empty space where no line break occurs, essentially dividing your text. Like a paragraph. In most HTML editors, you can either enter this, or you can leave an actual space between closed-off paragraphs or divisions.
There’s obviously a lot more to coding than a couple of basic tricks, but knowing just a few elements can go a long way. Once you have an understanding of the basics, and what they mean in code language, you can start to get a better understanding of other code elements and consider how each section relates.
If you find another bit of code you’re not sure about and you need help, you can always Google the opening parameter to get an idea of why it exists and what it’s doing.
The more complex jobs will always require
expert assistance
– it’s hard to understand the depth of code without proper training – but these small bits of knowledge can help you sort out little issues in a pinch.