Learn HTML,CSS, Python etc from the foundation

Wednesday, December 19, 2018

HOW TO PERFORM IMPORTANT FUNCTIONS USING HTML BASICS

No comments :

There are several functions (such as creating a paragraph, single line break, text formatting etc) you can perform using HTML basics. These HTML basics will be of great help if you want to build a website of your own.
Here are the elements and the functions you can use it to perform as well.

1.     THE <p> ELEMENT
The <p> elements are used to create paragraphs in HTML document. It is very easy to use. Just like the <title> element, the <p> element has both opening tag and closing tag. So if you want to create a paragraph, all you need to do is to write your sentence(s) in between the opening tag <p> and the closing tag </p>. You can create as many paragraphs as you can. Let’s look at the example below

<html>
      <head>
        <title> Homepage</title>
        </head>
        <body>
         <p>my first paragraph</p>
        <p>my second paragraph</p>
        <p>my third paragraph</p>
        <p>my four paragraph</p>
  </body>
</html>

It will look like this in your text editor.


Save it, click to open it and you will see the paragraph




2.     SINGLE LINE BREAK (<b  /> element)
If you want to add a single line of text without starting a new paragraph, then you have to use the single line break element. The single line break uses <br  /> element to execute this function in HTML document. For you to understand how this element works properly, you have to carefully master the example below

      <head>
        <title> Homepage</title>
        </head>
        <body>
         <p>my first paragraph</p>
        <p>my second  paragraph is <br  /> beautiful</p>
  </body>
</html>
Save it, open it and you will see the result
3.     FORMATTING ELEMENT
In HTML, you can change the visual style of the text if you wish to do so. Formatting elements were primarily designed to help you display certain text styles. Let’s look at some of these formatting elements and how they work.

<html>
      <head>
        <title> Homepage</title>
        </head>
        <body>
         <p> for normal tex</p>
        <p> <b> for bold text</b></p>
        <p><big>for big text</big></p>
        <p><i>for italics text</i></p>
        <p> <small>for small text</small></p>
        <p><strong> for strong text</strong></p>
        <p><sub>for subscripted text</sub></p>
         <p> <ins> for inserted text</ins></p>
        <p><sup>for superscripted text</sup></p>
        <p><deleted>for italics text</deleted></p>
  </body>
</html>


Save it and open it to see the result

PLEASE NOTE that <b>tags and <strong> tags both make the text bold. However, the difference is that <strong> tags are used to highlight important points or phrase in a sentence. It is usually referred to as phrase tags instead. The reason is that it is used to indicate that a particular phrase is more significant or important in a sentence than the other.

                                              WRAPPING UP
With constant practice of the lesson above, you will find it very easy to create paragraphs, add a new line to text without going to a new paragraph, and as well as perform text formatting.  Our next lesson you will be learning a special part of HTML.




No comments :

Post a Comment