HTML Shortcut Codes For Beginners

HTML Shortcut Codes For Beginners

Are you learning to code in HTML? There are a lot of codes to remember. I’ll help you remember the ones you’ll use most.

1. HTML Headings and Paragraphs

When you’re writing in code, your headings and paragraphs look like this.

When they are put into a web browser they end up looking like what you see below. It’s important that you use end tags. If the text in your paragraph starts with <p>, then you will need to end it with</p>. The same goes for headings.

Change the number in your heading tags to increase or decrease the font size. Higher numbers mean smaller text, despite it seeming like it should be the opposite. The headings below are based on the <h1> through <h3> coding above. Only the very last line is coded as a paragraph.

Your Text

Your Text

Your Text

Your Text

2. HTML Styles

Now take your normal text and make it extraordinary. Add color!

To add color use the code below. You are adding the style of color to the paragraph element. Make sure that you put parentheses before and after “color:teal”. If you don’t, you risk the whole sentence not even showing up. Now let’s see how we add links.

Lots of time we want to link to other content. For example, I learned all about coding from the W3schools website. Do you see how I linked that? Use the formula below. You use <a href to insert a link into a page in HTML. What about adding images to your page?

Use <img to insert an image into a page. The src is literally the source of the image. It’s the file name. The alt is where you add a description to the image. This is very good for SEO. It is also helpful for when an image link is broken. You still know which image was supposed to be there.

Save this post for anytime you forget these basic codes.

Image credit: Top Image

Leave a Reply

Your email address will not be published. Required fields are marked *