Loading Please Wait...

Logo Lynxsia IT Solutions

HTML Basics

HTML Basics

In this tutorial, we will discuss some basic HTML pages demonstrating some HTML Elements, tags, and attributes. Do not feel worry if you don't know these elements, tags, and attributes. We'll discuss them in our next tutorials. This tutorial is for you to get familiar with HTML code.

HTML Document

Each and every HTML document start with type declaration <!DOCTYPE>, which tells the browser that it is an HTML document.

All the HTML document starts with <html> and ends with </html> tags.

All content that is shown on the browser is written inside <body> and </body> tags.

Have a look at the below example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <h1>Some Heading</h1>
              <p>Some Paragraph</p>
            </body>
          </html>
        
      
HTML <!DOCTYPE> Declaration

The element <!DOCTYPE> represents the document type for the web browsers so that browsers may understand it and render/show content correctly.

It is the first line of any HTML document and must write at the top of the document before any other elements.

It is not case sensitive meaning <!DOCTYPE> and <!doctype> are the same.

The valid document type declaration for HTML5 is:
					 
        
          <!DOCTYPE html>
        
      
HTML Headings

In HTML, there are 6 types of heading which are defined by <h1> to <h6> tags.

<h1> defines the most important heading and <h6> defines the least important heading

HTML headings example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <h1>Heading 1</h1>
              <h2>Heading 2</h2>
              <h3>Heading 3</h3>
              <h4>Heading 4</h4>
              <h5>Heading 5</h5>
              <h6>Heading 6</h6>
            </body>
          </html>
        
      
Learn more about headings in our HTML Heading Tutorials
HTML Paragraph

In HTML, paragraph is defined by <p> tags.

HTML paragraph example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <p>Some paragraph</p>
              <p>Another some paragraph</p>
            </body>
          </html>
        
      
Learn more about paragraphs in our HTML Paragraph Tutorials
HTML Links

In HTML, links are defined by <a> tags.

HTML link example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <a href="https://lynxsia.com">This is the link to Lynxsia IT Solutions Website.</a>
            </body>
          </html>
        
      
Here href is used with <a> tag which is an attribute for the tag. Attributes provide additional information for the tag. Learn more about attributes in our HTML Attributes Tutorials
Learn more about links in our HTML Links Tutorials
HTML Images

In HTML, image is defined by <img> tags.

HTML image example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <p>Some paragraph</p>
              <img src="https://lynxsia.com/upload/logo/lynxsia-it-solutions-logo_1661513244.png" alt="Lynxsia IT Solutions Logo" width="200" height="200">
            </body>
          </html>
        
      
Here src, alt, width, and height are supplied as attributes.
Learn more about images in our HTML Images Tutorials
View HTML Document/Page Code

Sometimes we are curious to know how web pages are written in HTML. This will be achieved by the following:

View HTML Source Code

In the HTML page right-click and then click on "View page source" or you can press "CTRL+U".

Inspect An HTML Element

In the HTML page right-click on any part of the page and then click on "Inspect" or you can press "CTRL+SHFT+I". In this way, you can understand how an element is designed. You get to know its HTML as well as CSS and you can also modify the code on the browser itself.

How you feel about this blog:

Share this blog on:

Report Us

If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com

Contact Us
Ads
Logo
Lynxsia IT Solutions

We are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..

Kotwali Road, Chhiptehri, Banda, 210001, UP, India

Copyright © 2022, Lynxsia IT Solutions, All rights reserved