Have you ever looked at HTML code and wondered what all of the coding meant? Well in this article we are going to learn the basics of writing HTML code.
Now lets discuss some of the main points when writing HTML tags.
5 Points to successfully code with HTML
- HTML tags are like keywords, called tag names…and they are surrounded by brackets, for example <center>
- HTML tags always come in pairs, for example, <b></b>
- The first tag is called the start or opening tag. The second is called the end or closing tag.
- Opening and closing tags are always the same…just the closing tag has a forward slash before the tag name. For example, <h1> </h1>
- The content that you want the viewer to see goes between the opening and closing tags. For example, <b>Coding is Fun!</b>
Let’s give it a try
Lets take a look at the screen shot below to see some examples of HTML tags in action:
If we look a the first tag we will see that this is an image tag. We have an opening <img tag and also a closing /> tag. As you can see we dont have too put “img” in the closing tag for any image.
Next we see an h2 heading tag. We have an <h2> opening tag and a </h2> closing tag. So all of the text between these two tags will be a heading 2 style of text.
The next tag that we see highlighted is an unordered list tag, or <ul>. So we have an unordered list going on. I will explain how to create this in a future tutorial, but just for now recognize that this is how a list tag looks and is used in HTML.
We have an opening <ul> list tag and a closing </ul> list tag and in between we have several <il> tags that make up the elements of the unordered list. You will notice that they all open and close with the tags.
Use Tags To Control How Your Content Appears
So, I hope that you can see that HTML is not all that scary. Once you learn all of the different tags that are available, its very easy to use these tags to control how you want your content to appear.
And I want to mention, that you don’t have to remember all of the different HTML tags. If you can’t remember a tag name, or how it is used, you can google it, or you can just go to this website, w3schools.com, and search, and not only will you find the tag, but an explanation of how it’s used.
On To The Next Article
I hope you enjoyed this article on how to write HTML. The next article in the series is, Learning HTML Code Part 3-Basic HTML Tags, and will discuss some of the basic tags that are used when coding websites with HTML.
Latest posts by Robin McDonald (see all)
- Optimize Your WordPress Images With ShortPixel - January 15, 2018
- How To Increase Your SEO By Adding Keywords And Meta Descriptions In WordPress Posts And Pages - November 20, 2017
- Uninstalling a WordPress Plugin And Why Its Important - October 30, 2017