Skip to content
  • Facebook
GeekCer Logo

GeekCer

The geek's Coding education and Review centre

  • Home
  • Tutorials
    • Java
    • Servlet
    • JSP
    • Python
    • C Tutorial
    • Spring
    • Spring Boot
    • MongoDB
    • Hibernate
    • Data Structure
  • General Knowledge
  • Biography
  • Grammar
  • Festival (त्योहार)
  • Interview
  • Differences
  • Important
  • Toggle search form

Home » Important » HTML Tutorial

  • Fundamental Duties of Indian Citizens
    Fundamental Duties of Indian Citizens | 11 मौलिक कर्तव्य हिंदी में General Knowledge
  • List Of National Animals Of Countries
    List Of National Animals Of Countries General Knowledge
  • Kishkindha Kand in Hindi | Ram meets Hanuman | किष्किंधा कांड
    Kishkindha Kand in Hindi | Ram meets Hanuman | किष्किंधा कांड Spiritual
  • Ramayana Uttar Kand Luv Kush| रामायण उत्तर कांड इन हिंदी
    Ramayana Uttar Kand Luv Kush | रामायण उत्तर कांड इन हिंदी Spiritual
  • What is Verb
    What is Verb? Types of Verbs and Examples Grammar
  • World Earth Day in Hindi | पृथ्वी दिवस कब और क्यों मनाया जाता है?
    Earth Day in Hindi, Theme | पृथ्वी दिवस कब और क्यों मनाया जाता है? General Knowledge
  • Human rights day
    Human rights day in Hindi: 10 दिसंबर ह्यूमन राइट्स डे General Knowledge
  • P V Sindhu Biography in Hindi
    P V Sindhu Biography in Hindi, Badminton, State, Caste पी. वी. सिंधु जीवन परिचय, कहानी, राज्य, जाति Biography

HTML Tutorial

Posted on September 2, 2021November 13, 2021 By GeekCer Education No Comments on HTML Tutorial
HTML Tutorial

HTML Tutorial is designed for the web developer who is interested in designing websites and web applications. You can use HTML in any programming language like JSP, PHP, ASP etc.

HTML is the basis or backbone in creating a Web application or Website. In every file HTML will always with <HTML> tag and ends with </HTML> tag. The web browser reads the content of the file which is inside the <HTML> and </HTML> tags and displays on the browser.

HTML tags are case-insensitive. That is, <HTML> will be the same as <html> and </HTML> will be the same as </html>.

Table of Contents

  • <HEAD> tag in html
  • <BODY> tag in html
  • <TITLE> tag in html
  • Html headings <H1>…</H1>
  • Paragraph <P>…</P> in html tutorial
  • Preformatted Text <PRE>…</PRE> in html (Tutorial)
  • Begin Row <BR> in html
  • Link <A>…</A> in html (Tutorial)
  • <TABLE> in html (Tutorial)
    • Table ALIGN and WIDTH
    • Table CELLSPACING and CELLPADDING
    • Table COLSPAN and ROWSPAN
  • Ordered List <OL> in html
  • Unordered List <UL> in html
  • Graphics in Web Pages html (Tutorial)
  • Html Forms <FORM>…</FORM> in html (Tutorial)
  • TextBox in html
  • CheckBox in html
  • Radio button in html

<HEAD> tag in html

The header will serve as an identifier on the page you create. Inside the header we define the meta data, information related to document etc. To define header in HTML tag you need <HEAD> tag and you should add <HEAD> tag below the <HTML> tag and it will look like this:

<HTML>
<HEAD>
 <!-- Head Contents -->
</HEAD>
</HTML>

<BODY> tag in html

The body section is the section where you can write any text that you want to display on a web page. To define body, we use <BODY> tag to start the body and end it with the </BODY> tag.

<HTML>
<HEAD>
 <!-- Header Part -->
</HEAD>
<BODY>
 <!-- Body Part -->
</BODY>
</HTML>

<TITLE> tag in html

By using <TITLE> you we give the title to the web page that we created. Title tag starts with <TITLE> and ends with </TITLE>, we put the title tag inside the <HEAD>…</HEAD> section.

<HTML>
<HEAD>
<TITLE>Welcome to GeekCer</TITLE>
</HEAD>
<BODY>
Hello geeks, How are you all?
</BODY>
</HTML>

Html headings <H1>…</H1>

The headings are different from tags, because content inside <TITLE>… </TITLE>will not appear in web pages but content inside <H1>…</H1>will appear in web pages.

HTML provides six levels of headings which are <H1>, <H2>, <H3>, </H4>, <H5> and <H6>.

<HTML>
<HEAD>
<TITLE>Title of Web page</TITLE>
</HEAD>
<BODY>
  <H1>...</H1>
  <H2>...</H2>
  <H3>...</H3>
  <H4>...</H4>
  <H5>...</H5>
  <H6>...</H6>
</BODY>
</HTML>

Paragraph <P>…</P> in html tutorial

To create a paragraph in HTML, you can use <P> tag to start and </P> tag to end. You can adjust the paragraph you create by using the ALIGN attribute followed by the position (LEFT, RIGHT, CENTER).

<HTML>
<HEAD>
  <TITLE>Paragraph Example</TITLE>
</HEAD>
<BODY>
  <P ALIGN="right"> Paragraph with right aligned. </P>
  <P ALIGN="center"> Paragraph with center aligned. </P>
  <P ALIGN="left"> Paragraph with left aligned. </P>
</BODY>
</HTML>

Preformatted Text <PRE>…</PRE> in html (Tutorial)

We use the <PRE> tag is html to display text the same as we type in an HTML document. The browser will display in a monospaced font (usually courier new).

<HTML>
<HEAD>
  <TITLE>Preformatted Text</TITLE>
</HEAD>
<BODY>
  <PRE> Contents in the first line.
  Contents in the section line.</PRE>
</BODY>
</HTML>

Begin Row <BR> in html

The <BR> tag will create a newline without the leave a blank space underneath. We use <BR> tag to break the line and start text for the next line.

<P>HTML will help you to design the website 
  <BR>but if you use CSS with html then you 
  <BR>will have better look can feel.
</P>

Link <A>…</A> in html (Tutorial)

In the html, we use the anchor <A> command to create links. And it uses HREF attribute to refer the page or resources.

If you want to create a link in a same document HTML then you can specify a name of the anchor location for the link. You can create anchor name by adding the NAME attribute to the <A> tag.

<HTML>
<HEAD>
  <TITTLE>Link Example</TITTLE>
</HEAD>
<BODY>

  <A NAME="up">Top content</A>

  <P>Get, <A HREF="#down">More info</A> </P>


  <A HREF="destination.html">Go to destination page</A>

  <A NAME="down">Location in same page</A>

  <A HREF="#up">UP</A>
</BODY>
</HTML>

<TABLE> in html (Tutorial)

We can use table to display information concise and easy to read that is why we use table. The start tag of the table is <TABLE> and the closing tag is </TABLE>.

The <TABLE> tag has several important parts:

  • <CAPTION> …</CAPTION> : We use it to form the title of table. The table title will be available outside the table at the top or bottom.
  • <TH>…</TH> : We use this tag to put the table title at the top or the far left of the table.
  • <TD> … </TD> : To write data or information in a table.

Table ALIGN and WIDTH

Use the ALIGN attribute for horizontal alignment, which can be left for left alignment, right for right alignment. You can use VALIGN for vertical alignment, TOP for top alignment, MIDDLE for center alignment, and BOTTOM for bottom alignment. Meanwhile, we can use WIDTH to set the width table, usually expressed in (%) or expressed in pixels that actually have a size.

Table CELLSPACING and CELLPADDING

We use CELLSPACING attribute to specify the amount of space between the two cells and CELLPADDING to set the amount of space between the boundaries/border with the content or text in the cell.

Table COLSPAN and ROWSPAN

We use COLSPAN attribute to merge multiple columns into 1 column and ROWSPAN to merge multiple rows into one.

<html>
<head>
<title>Example of Table in html</title>
</head>
<body>
  <table width="50%" border="1" cellspacing="5" cellpadding="5">
   <tr>
    <td width="40%" rowspan="2">Width 40% and rowspan 2</p></td>
    <td width="60%">Width 60%</td>
   </tr>
   <tr>
    <td width="60%">Width 60%</td>
   </tr>
   <tr>
    <td width="100%" colspan="2">Width 100% and colspan 2</td>
   </tr>
</table>
</body>
</html>

Ordered List <OL> in html

When you need a list where each section should be numbered sequentially then you should go for ordered list. You can achieve this by using tag <OL>…</OL> tags. For each part you can use <LI> …</LI> inside the <OL>…</OL>.

When using this OL the numbering starts 1,2,3,… , but you can change it by using the TYPE attribute in the <OL>.

TYPE=1: ordered list with 1, 2, 3,
TYPE=I: list in order of I, II, III,
TYPE=a: an ordered list with a, b, c,

<OL>
 <LI>First Part</LI>
 <LI>Second Part</LI>
 <LI>Third Part</LI>
 <LI>Fourth Part</LI>
</OL>

Unordered List <UL> in html

In an unordered list, there is no order in a list. Every part of the unordered list marked with a bullet which is the default for unordered lists. To create this tag <UL> to start and for closing we use </UL>. We use <LI>…</LI> for each part.
We can also use disc marks, circles, etc. as well.

<UL TYPE="square">
 <LI>First Part</LI>
 <LI>Second Part</LI>
 <LI>Third Part</LI>
 <LI>Fourth Part</LI>
</UL

Graphics in Web Pages html (Tutorial)

In HTML, We use the IMG tag to display images in web pages. The most frequently used images on web pages are GIF and JPEG.

We use SRC attribute to determine the source of the image and ALT attribute as text instead of images.

There are several attributes in the IMG tag, namely:

  • BORDER: give a border or border on the image by default=0
  • HEIGHT,WEIGHT: specify the height and width of the image in pixels
  • HSPACE,VSPACE: specify the horizontal spacing and vertical spacing between images with surrounding objects.
  • ALIGN: adjusts the alignment of the image to the surrounding objects.
<IMG SRC="image_file" ALT="alternative_name">

Html Forms <FORM>…</FORM> in html (Tutorial)

The <FORM> and <INPUT> tags are used together to request input from the user for sending to the Server. The <FORM> tag creates the outline and the <INPUT> tag provides the elements interface with the user. For standard form writing are as follows:

<FORM METHOD="POST/GET" ACTION="URL">
…
…
…
</FORM>

The METHOD attribute has 2 values POST and GET. GET method sends data on server by putting the data at the end of the designated URL. POST method send the data separately. If there are many inputs, it is recommended that you use POST. ACTION will contain the URL of the program called by the form.

TextBox in html

Textbox is a type of control for entering data. HTML provides <INPUT> tags with attribute TYPE=”text” to create an input box. We use VALUE attribute to give the input value, and SIZE to determine the longest limit of an input.

<input type="text">

CheckBox in html

You can provide a TYPE attribute by using a working Checkbox to give the user a choice.

<input type="checkbox">

Radio button in html

If you replace the TYPE=”checkbox” attribute with TYPE=”radio”, the user will be able to select only one available option. User cannot choose more than one option. You can CHECKED attribute for default selection.

<input type="radio">

In conclusion, in this article you have learned the basic html tags and controls by which you can design or create a simple html web page.

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • More
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Pinterest (Opens in new window)

Also Read

Important Tags:Software Engineering, Web Application

Post navigation

Previous Post: Immutable class in Java | How to create Immutable class in Java
Next Post: Maven Tutorial

More Related Articles

Software Performance Testing in Hindi Software Performance Testing in Hindi Important
How to become a Chief Financial Officer (CFO) How to become a Chief Financial Officer (CFO)? Important
Indian Constitution भारतीय संविधान | भारत का संविधान Indian Constitution भारतीय संविधान | भारत का संविधान Important
Agile Methodology of Software Development Agile Methodology of Software Development Important
Digital Marketing in Hindi (डिजिटल मार्केटिंग क्या है?) Digital Marketing in Hindi (डिजिटल मार्केटिंग क्या है?) | डिजिटल मार्केटिंग का महत्व Important
Different Types of Loans in India, Eligibility, Documents, Benefits Different Types of Loans in India, Eligibility, Documents, Benefits Important

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • National Farmers Day in Hindi | राष्ट्रीय किसान दिवस पर निबंध | चौधरी चरण सिंह जयंती
  • Human rights day in Hindi: 10 दिसंबर ह्यूमन राइट्स डे
  • Unicef day is celebrated on December 11 | Speech on unicef day
  • Indian Navy Day: जल सेना दिवस कब और क्यों मनाया जाता है?
  • P V Sindhu Biography in Hindi, Badminton, State, Caste पी. वी. सिंधु जीवन परिचय, कहानी, राज्य, जाति
  • Draupadi Murmu Biography In Hindi | द्रौपदी मुर्मू की जीवनी
  • Difference between Internet and Intranet
    Difference between Internet and Intranet Differences
  • OSI Model | 7 Layers of OSI Model in Computer network
    OSI Model | 7 Layers of OSI Model in Computer network, Functions Networking
  • Similarities and difference between OSI and TCP/IP model
    OSI vs TCP/IP Model, Similarities and difference between OSI and TCP/IP model Networking
  • Difference between TCP and UDP
    Difference between TCP and UDP | TCP vs UDP examples Differences
  • IPv4 Vs IPv6 | Difference between IPv4 and IPv6
    IPv4 Vs IPv6 | Difference between IPv4 and IPv6 Differences
  • Network kya hai (नेटवर्क क्या है)
    Network kya hai (नेटवर्क क्या है) Networking
  • TCP/IP Model, Full Form, Layers and their Functions
    TCP/IP Model, Full Form, Layers and their Functions Networking
  • Java Tutorial
  • Servlet Tutorial
  • JSP Tutorial
  • Maven Tutorial
  • HTML Tutorial
  • Programs
  • Hindi/English Grammar
  • Difference Between ... and ...
  • HR Interview
  • Important Articles

Write to Us:
geekcer.code@gmail.com

  • About Us
  • Privacy and Policy
  • Disclaimer
  • Contact Us
  • Sitemap

Copyright © GeekCer 2022 All Rights reserved