Web Info and IT Lessons Blog...

Monday 1 September 2014

Html Text Tags

In the previous lesson we learnt how to make a very basic layout of an html page. In this lesson we will take one step a head and explore a little more about html and css.

Html Heading Tags: There are 6 types of heading tags in html. i.e

<h1></h1>
<h2></h2>
<h3></h3>
<h4></h4>
<h5></h5>
<h6></h6>

h1 tag has the largest text size of the six heading tags and should not be used frequently in the web page. h1 tag should only be used for the main heading of the web page. Similarly h2 tag should only be used a few times in a web page and so on.

Heading Tags

Paragraph Tag: Paragraph tag is used to write a paragraph in html.

<p> This is random text to elaborate the functionality of a paragraph tag.This is random text to elaborate the functionality of a paragraph tag. This is random text to elaborate the functionality of a paragraph tag.This is random text to elaborate the functionality of a paragraph tag. This is random text to elaborate the functionality of a paragraph tag.</p>

Strong Tag: Strong Tag is used for important text in html web page.

<strong>Important Text</strong>

Bold Tag: Bold Tag is used for bold text in html web page.

<b>Bold Text</b>

Emphasized Tag: Emphasized Tag is used for emphasized text in html web page.

<em>Emphasized Text</em>

Italic Tag: Italic Tag is used for Italic text in html web page.

<i>Italic Text</i>

Break Tag: Break Tag is used to break a line in html. Break tag has no ending tag.

<br /> is used to break a line to next line.

Code Tag: Code Tag is used for computer and programming code in an html webpage.

<code>for(a=1;a > 10;a++)</code>

For the use of html text tags in a web page consider the following code:

<html>
<head>
<title> Title of the Website </title><br />
<head>
<body>
<div style="height:100px;border:1px solid black;background:red"><h1>Page Title</h1></div><br />
<div style="height:450px;border:1px solid black;background:orange"><p>This is random text to elaborate the functionality of a paragraph tag. This is random text to elaborate the functionality of a paragraph tag.This is random text to elaborate the functionality of a paragraph tag. This is random text to elaborate the functionality of a paragraph tag.This is random text to elaborate the functionality of a paragraph tag. This is random text to elaborate the functionality of a paragraph tag.This is random text to elaborate the functionality of a paragraph tag. This is random text to elaborate the functionality of a paragraph tag.This is random text to elaborate the functionality of a paragraph tag. This is random text to elaborate the functionality of a paragraph tag.This is random text to elaborate the functionality of a paragraph tag. This is random text to elaborate the functionality of a paragraph tag.This is random text to elaborate the functionality of a paragraph tag. </p></div><br />
<div style="height:70px;border:1px solid black;background:brown"><h4>All Rights Reserved 2014</h4></div><br />
</body>
</html>

Heading Tags in Web Page

Related Posts
Basics of Html
Html Image and Anchor Tags
Html Form Elements
Html Tables
Row and Column Span in html
Iframe tag in html
Simple 2 column layout of a web page
3 column layout of a web page

No comments:

Post a Comment