Monday, February 10, 2014

Web Design - Tags to format text





Lesson 4
( Tags to format text )


Hi and welcome on learn 4 free programming!

In this lesson i will teach you how to stylize your text. This is very useful when you are writing something and you want to bold, underline, change size,..., but in this lesson we are going to talk about 3 basic tags. Most websites have this, to make something more visible to attract your attention. These tags that i'm going to show you are very simple to use.

Okay let's start with styling the text. First we are going to do is bolding the text.





            Tag <b>


If you are writing text for your website and you want to bold text you have to use <b> tag. B tag stands for bold. All you need to do is open and close the <b> tag. Text that's between <b> tag is going to be bold.

- example 1:

   <html>
        <head></head>

   <body>

         <b>This is bold text </b>

    </body>
   </html>


When you write text and you want some part of the text to be bold you have to open and close the <b> tag. Between <b> tag write text that you want to be bold. 

- example 2:

   <html>
        <head></head>

   <body>

         This is <b> bold text </b>

    </body>
   </html>

In example 2 you see that <b> tag is opened within text. With this we bolded just a part of the text that we wanted ( in example 2 text that's going to be bold is "bold text" ).


            Tag <i>

When you write text and you want to explain something you should should angle the text ( italic). That's where this tag comes in. With <i> tag you can angle the text to be different than one which you write.

- example 3:

   <html>
        <head></head>

   <body>

         <i>This is italic text </i>

    </body>
   </html>

In example 3 whole text is italic. But if you want just part of the text to be italic ( for example "text" to be italic ) you need to open it in front and close it behind of the text that you want to be italic.

- example 4:

   <html>
        <head></head>

   <body>

         This is <i> italic text </i>

    </body>
   </html>

In example 4 you see that <i> tag is opened within text. With this we italic just a part of the text that we wanted ( in example 4 text that's going to be italic is "bold text" ).


            Tag <u>

When you write text and you want to emphasize very important thing you will need to underline. For that you will use <u> tag. With <u> tag you can underline (emphasize) important part of the text.

- example 5:

   <html>
        <head></head>

   <body>

         <u>This is  underlined text </u>

    </body>
   </html>

In example 5 the whole text is going to be underlined. But what if you don't want whole text to be underlined and yo want just a part of the text to be underlined. Just like in previous two tags, you need to open it in front and close it behind of the text that you want to be underlined.

- example 6:

   <html>
        <head></head>

   <body>

         This is <u> underlined text </u>

    </body>
   </html>

In example 6 the text that's going to be underlined is "underlined text".


Okay that's it for this lesson, come back to learn more about HTML.

I will be posting more lessons about HTML, so follow me, share and comment if there is something you would change or if you like it :) .

If something doesn't work or you need help just send us email on: sashans89@gmail.com or sasha97ns@gmail.com  and we will help you.

See you next time, Byee.



Sasha






No comments:

Post a Comment