codescracker
html

HTML Basic Tags



« Previous Tutorial Next Tutorial »

Here you will learn about basic tags used in an HTML document. There are following basic tags, you will learn in this tutorial:

HTML Basic Tags Example

Here is an example of basic tags used in HTML document. This is the first example on basic tags in HTML.

<!DOCTYPE HTML>
<html>
<head>
   <title>HTML Basic Tags Example</title>
</head>
<body>

   <h1>HTML Basic Tags</h1>
   <p>This is the tutorial on HTML basics tags.</p>
   <p>Here,<br />You will learn all about HTML basic tags.</p>
   <hr />
   <p>To learn about complete HTML tags, there refer   to 
   <a href="http://codescracker.com/html/html-elements.htm">HTML All Tags</a> tutorial.</p>

</body>
</html>

Here is the output produced by the above HTML basic tag example code:

html basic tags

HTML Preserve Formatting Tag

You are free to write your "as it is text" using HTML <pre> tag. For example, to write computer code, use <pre> tag. Here is an example uses <pre> tag to write "as it is text" on the web page. This is the second example on basic tags in HTML.

<!DOCTYPE html>
<html>
<head>
   <title>HTML Basic Tag Example</title>
</head>
<body>

   <p>Without PRE tag.
      This is HTML Basic Tag Example
         to understand about
            HTML Preserve Formatting
               tag.</p>
               
   <p><pre>With PRE tag.
      This is HTML Basic Tag Example
         to understand about
            HTML Preserve Formatting
               tag.</pre></p>

</body>
</html>

Below is the sample output produced by the above HTML basic tag example.

HTML Preserve Formatting Tag

Here is one more example:

<!DOCTYPE html>
<html>
<head>
   <title>HTML Basics Tags Example</title>
</head>
<body>

<p><pre>This is
   HTML basic
tag example. You can
         use pre tag
   to create "as it is text".</pre></p>

</body>
</html>

Following is the sample output produced by the above HTML Basic tag example code:

html preformatted text

HTML Online Test


« Previous Tutorial Next Tutorial »



© Copyright 2021. All Rights Reserved.

CodesCracker