Thursday, May 11, 2017

HTML Basic Tags

Hello guys good evening....pardon me if its not evening from the location you reading the post...Its realy been a while since i made my last tutorial,was realy busy with some stuffs...Well lets go straight to the topic of the night.....In this tutorial i wanna be talking about the basic tags of HTML. So without wasting much time lets proceed, and please feel free to ask questions in any area you don't understand.

Heading Tags
First i wanna be starting with the heading tag,any document starts with the heading.You can use different sizes for your headings.....HTML also has six levels of headings,which use the elements <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, while displaying any heading browser adds one line before and one line after that heading

Example
<!doctype html>
<html>
<head>
<title>Tutorial on headings</title>
</head>
<body>
<h1>This is the first heading</h1>
<h2>This is the second heading</h2>
<h3>This is the third heading</h3>
<h4>This is the fourth heading</h4>
<h5>This is the fifth heading</h5>
<h6>This is the sisth heading</h6>
</body>
</html>

You can try the above code on your text editors to see results for your selfs....

Paragraph Tags
The <p> tag offers a way to structure your text into different paragraphs....Each paragragh of text should go in betwwen an opening <p> an a closing </p> tag as shown below in tje example

Example
<!doctype html>
<html>
<head>
<title>Tutorial on paragraph</title>
</head>
<body>
<p>This is the first heading</p>
<p>This is the second heading</p>
</body>
</html>

You can try the above code on your text editors to see results for your selfs

Line Break Tag
Whenever <br /> elements is used,anything following it starts fron the next line..This tag is an example of an empty element,where you do not need opening and closing tags as there is nothing to go in between them..

The <br /> tag has space between the characters br and  the forward slash..if you omit this space,older browsers will have trouble rendering the line break, while if you miss the forward slash character and use just <br> it is not valid in XHTML....Try the example below

Example
<!doctype html>
<html>
<head>
<title>Tutorial on line break</title>
</head>
<body>
<p>The author of this blog is KENNEDY<br />
a citizen of NIGERIA in west africa<br />
Thanks for visiting my blog
</p>
</body>
</html>

you can try the above out to see results

Centering Content
You can use <center> tag to put any content in the center of the page or any table cell

Example
<!doctype html>
<html>
<head>
<title>Tutorial on Centering</title>
</head>
<body>
<p>This is the first paragraph</p>
<center>
<p>This is the second paragraph which has been centered</p>
</center>
</body>
</html>

 You can text run the above code to see results

Alright guys thats it for the night...will continue with the rest of the HTML tags in my next tutorial..GOODLUCK!!

Links to previous tutorials on HTML : Html IntroductionHtml TagsHtml Document StructureThe Doctype Declaration
Share:

0 comments:

Post a Comment