Nowadays we create blogs and websites using popular content management system (CMS like wordpress). The best thing about CMS is that you don’t need to have any knowledge of programming language or coding to create your website. But still there is some basic HTML coding that every blogger should know.
There are situations when we need to create link to certain file, display images or do some little stuff. In this post I am going to tell you some basic but important HTML tags that you should know.
Note: This post may look messy but it’s very informative.
The things you should know about HTML
- HTML stands for HyperText Markup Language.
- HTML is the easiest computer language ever.
- HTML is not case sensitive that means you write HTML tags in uppercase as well as lowercase both will work fine!
HTML Headings Tags H1-H6
HTML has heading tags, H1 to H6 just like headings defined in MS Office. H1 heading tag stands for most important heading of article i.e. Title of article. Then comes H2 for sub-headings and then come H3, H4, H5 and H6 according to their importance.
From the point view of SEO H1 heading tag is given most weightage then other heading tags. To create an H1 heading tag you have to write following code…
<H1> Sample H1 Heading </H1>
<H2> H2 Heading </H2>
<H1> means heading starts, </H1> means heading ends here. You can of course edit the text between them according to your need. Likewise H1 and H2 tags you can create all headings.
Bold and Underline Tags
To create bold or underlined statements you can use <B> or <u> tags. For italic font you can use <i> tags. To break line you can use <BR> tag.
<B> This is Bold Text </B>
<U> This is Under lined Text </U>
<i> An Italic Statement </i>
<B> This is First Line <BR> This is Next Line </B>
HTML Paragraph Tags
The most important thing in an article we need is paragraphs. To create paragraphs we use <P> tags.
<P> this is a sample paragraph written by someone to make sure that everybody should understand HTML paragraphs. HTML tags are important and should be known by everyone. </P>
This way you can create two-three or more paragraphs in each article with their headings that you already know how to do.
Suppose you want to create a paragraph that should be aligned to right or left or center then you can use attributes with paragraph tags.
Attribute: Align=”left” or Align=”right” or Align=”center”
<P Align=”left” > this is a sample paragraph written by someone to make sure that everybody should understand HTML paragraphs. HTML tags are important and should be known by everyone. </P>
Creating Hyperlink using HTML Tags
Hyperlink is a link which when clicked lands us to different location that is linked with hypertext. If you want to create a hyper link you have to use anchor tags <A>.
<A HREF=”http://himanshunegi.xyz”>The Blogger</A>
If this hypertext (Himanshu Negi Blog) is clicked it will land you to http://himanshunegi.xyz. If you want this new link to be opened in a new tag then you can add attribute TARGET=”BLANK”.
<A HREF=”http://himanshunegi.xyz” TARGET=”BLANK”>The Blogger</A>
To create a no-follow link that stops link juice to flow you can use REL=”NOFOLLOW” attribute.
<A HREF=”http://himanshunegi.xyz” REL=”NOFOLLOW” TARGET=”BLANK”>My Blog</A>
Display Image Using IMG
To display an image using HTML IMG tag you just need to know the SRC (source) of the image means the complete URL of image.
To resize image you can use HEIGHT=”VALUE” WEIGHT=”VALUE” tags. VALUE is pixel value.
<IMG SRC=”https://himanshunegi.in/favicon.ico” HEIGHT=”60” WEIGHT=”468” >
NOTE: You don’t need to close IMG tag like other HTML tags.
Adding banner to your website
A banner is an image with hyperlink that means when image is clicked it takes clicker to another page. You need to use the combination of <A> tag and <IMG> tag.
<A HREF=”http://himanshunegi.xyz” TARGET=”BLANK”> <IMG SRC=”https://himanshunegi.in/favicon.ico”></A>
In place of hypertext there is IMG tag for image.
Now I have taught you enough HTML and you can do experiments with all these tags and attributes. I hope you would like to learn more HTML.