HtmlCssMonk

Basics of HTML | Learn Basic HTML

Dig deep and you shall prevail.

DESCRIPTION

We have already learned about the structure of a Basic HTML Document.

Now, it’s time to learn about some Basic HTML tags.

Headings in HTML

Heading elements allow you to specify that certain parts of your content are headings — or subheadings. In the same way that a book has the main title, chapter titles, and subtitles, an HTML document can too.

HTML also has six levels of headings, which use the elements <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>. While displaying any heading, browser adds one line before and one line after that heading.

<!DOCTYPE html>
<html>

   <head>
      <title>Heading Example</title>
   </head>
	
   <body>
      <h1>This is heading 1</h1>
      <h2>This is heading 2</h2>
      <h3>This is heading 3</h3>
      <h4>This is heading 4</h4>
      <h5>This is heading 5</h5>
      <h6>This is heading 6</h6>
   </body>
	
</html>

This Code will produce the following result on your webpage –

This is heading 1

This is heading 2

This is heading 3

This is heading 4

This is heading 5
This is heading 6

Paragraphs in HTML

<p> elements are for containing paragraphs of text; you’ll use these frequently when marking up regular text content:

<!DOCTYPE html>
<html>

   <head>
      <title>Paragraph Example</title>
   </head>
	
   <body>
      <p>This is first paragraph of text in html-css monk.</p>
      <p>This is second paragraph of text html-css monk.</p>
      <p>This is third paragraph of text html-css monk.</p>
   </body>
	
</html>

This Code will produce the following result on your webpage –

This is first paragraph of text in html-css monk.
This is second paragraph of text html-css monk.
This is third paragraph of text html-css monk.

Links in HTML

<a> tag is used to define HTML links. Links are an important part of any Web page , it helps to connect our page to another page.

<!DOCTYPE html>
<html>

<head>
<title>Link Example</title>
</head>

<body>
<a href="https://htmlcssmonk.com">This is a link to My site.</a>
</body>

</html>

This Code will produce the following result on your webpage –

This is a link to My site.

Learn more about HTML links.


Images in HTML

<img> tag is used to define HTML images tag. This tag is used to insert image in our web page.

<img src="images/htmlcssmonk.jpg" alt="logo">

This Code will produce the following result on your webpage –

Learn more about HTML Images.


Next topic – Formatting in HTML

Previous topic – Basics of HTML


Leave a Comment

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