Useful Tags

Okay now we are going to go over some of the basic tags that you will probably be using

The bold tag formats the content inside it and makes it bold here is an example of it

<b>some text</b>


The underline tag formats the content inside it and makes it underline here is an example of it

<u>some text</u>


Next is the <br /> tag and this tag is used a lot of times its used to make a break between content and it looks like this

text<br />text

The output will look like this

text
text

The <br /> makes a newline and so what happens if we had more than 1, well this is what happens when we add 2 instead of 1

text

text

Now there is more of a gap between the 2 pieces of text, we can add even more <br /> tags if we wanted to. 

Comments

Now we look into adding comments into our HTML code so that we understand what that piece of code is doing what for a future reference.

<body>Hello World</body> <!-- This is a HTML comment -->

This is how we write a HTML comment but please note this is only for HTML as other languages use other ways to handle comments.

Div Tag

The <div> tag is one of the most important tags and used everywhere for all kinds of reasons but its main purpose is to control the layout of a web page. So lets take a look at how its declared;

<div id="content">this is some content</div>

Now the importance of this tag is not in the tag itself its in the styling that you can do to it. Now the code snippet boxes you have seen around the site are <div> tag classes with certain CSS styling on them.

You will be seeing this tag constantly in the CSS section where we will be creating web layouts.

                                                                                                                                                                               

This free website was made using Yola.

No HTML skills required. Build your website in minutes.

Go to www.yola.com and sign up today!

Make a free website with Yola