Showing posts with label tags. Show all posts
Showing posts with label tags. Show all posts

Thursday, February 11, 2016

HTML Tutorial 3 Most Common Tags Used in HTML Documents


HTML Example


Im sorry for the delay to publish new posts but something was wrong with my PC. Thats   why I was in trouble with this and not able to write something new. Well Id like to continue the HTML tutorial. 


In this post I will discuss about some tags which are very common in preparing HTML documents. But before you go, dont forget to look at the following posts if you havent already gone through:
  • Creating a Simple HTML Document
  • Basic Parts of an HTML Document


Lets talk about the most common tags of HTML documents. You should also have a close look at our example document. Some of these tags are also used in that document. I think this will be helpful for you. 


Most Used Tags of HTML


  • Structural Tags: <html>, <head>, and <body> are the main structural tags of any HTML document. Each and every HTML document must contain these tags. Title   tag - <title> is also very important for an html document. Besides there are tags which are very common for all HTML documents. These are discussed below:

  • Anchors <a href> </a>: This tag is used to create anchor text. For example: <a href=http://munnamark.blogspot.com>Marks PC Solution</a>. The browser will show only Marks PC Solution hiding the link of our site. When someone clicks on the text, he will be directed to Marks PC Solution home page 

  • Paragraph <p>: This tag is used to create a new para. It has no end tag! You just need to place a <p> tag when you want to create a new para. 

  • Line Break <br>: This tag is used to break the current line. It is similar to pressing Enter button in Word Processors like MS Word or Wordpad. This tag has no end tag too!  You can break a like just by typing <br> before that line. 

  • Bold <b> </b>:  This tag is used to bold the text. For example: <b>Bold</b>. The result will be Bold. 

  • Italic <i> </i>: This tag is used to italicize the text. For example: <i>Italic</i>. The result will be Italic. 

  • Underline <u> </u>: This tag is used to underline a text. For example: <u>Underline</u>. The result will be Underline. 

  • Heading Tags: Start Tags: <h1>, <h2>, <h3>, <h4>, <h5>, <h6>.                                       End Tags: </h1>, </h2>, </h3>, </h4>, </h5>, </h6>. These tags are used to define the titles of the document. For example, <h1> is used for the document header title. <h1>Marks PC Solution</h1>. <h2> is used for the document section title. <h2>Your Ultimate Choice for Computer, Internet, Blogging, SEO & PC Troubleshooting Tips</h2>. Thus <h3>, <h4>, <h5> and <h6> decreases the font size of the title. 


Dont be confused by someone or by yourself! There are many other common tags for HTML documents. But these are just for giving you an idea. 


You should be careful while using the tags and their related attributes. Because any error in using the tags may result wrong output. Even a minor mistake may create serious problem. Because you may not be quick enough to find the errors! 

By the way, the rules and stadard of HTML varies from time to time. Sometimes your browser is able to show the document correctly even if there is any error in the source file! But it doesnt mean that you will not try to keep the document accurate. Whatever you do, do it with care. Best of luck. 



Stay with Marks PC Solution to get more interesting IT topics!





Read more »

Sunday, January 24, 2016

HTML Tutorial 4 Tags Without Ends


HTML Tags with no ending tags


After a long break I am gonna write another tutorial on HTML. This will be the number 4 tutorial of HTML. Today I would like to share some tags which dont have any endings! I mean you can just start these tags but they have no corresponding end tags. 


You might be interested to read the previously published HTML tutorial. These are as below: 
  • HTML Tutorial 1: Simple HTML Document (Example)
  • HTML Tutorial 2: Basic Parts of an HTML Document
  • HTML Tutorial 3: Most Common Tags in HTML Documents


Now I can proceed to the Tutorial 4: HTML Tags with No Ends. Have a look at the image below. 

HTML Tags with no corresponding end tags


The above image doesnt include all the tags that have no ends. See the complete list below: 

  • <area> 
  • <base> 
  • <basefont>
  • <br> 
  • <col> 
  • <frame> 
  • <hr> 
  • <img> 
  • <input> 
  • <isindex> 
  • <link> 
  • <meta> 
  • <param>  

These tags have no corresponding ends. You just need to start them. 

For example: The <br> tag is used to create a line break. I mean it is used to create a new line. And when you create another line break the first one automatically ends. So it is needless to put an end tag to the <br> tag. Thats why HTML standard excludes the corresponding end of the <br> tag. 

The same thing happened to the other tags mentioned in the list above. Another example could be the <img> tag. It is used to link to the image. Is it necessary to end an image with the help of an ending tag? Not at all. Thats why the image tag is also dont have any ending tag. 


* XHTML always requires end tags. (Quite disappointing!) 



The <p> Tag: 

What about the <p> tag? By this time you all know about this tag. It is used to create a paragraph. And it has a corresponding end tag too. You can also guess - </p>. But many HTML authors even dont know this exists! 

However if you avoid the ending tag, I mean the </p> tag, your browser will never complain. The document will work quite fine. It is somewhat like the <br> tag. But the <br> tag has no end by rules. 

You can consider the rule as Omitting Tags. Yes, there are some tags in HTML which have end tags but you can avoid them. 



Hope you enjoy todays tutorial. Because this is an interesting feature of HTML in that sense that some tags have no ends. Some end tags you can omit as you wish. Stay in touch to get more . . . 


Stay with Marks PC Solution to get more interesting IT topics!





Read more »