html introduction

What is HTML?

HTML is the standard language for creating web pages and applications. It describes the structure of a web page and includes cues for the appearance of the document as it denotes structural semantics for text such as headings, paragraphs, lists, links, quotes and other items.

HTML elements are described by tags, written using angle brackets. Tags such as <img> and <input> introduce content into the page directly. Others such as <p></p> surround texts and provide information about document text and may include other tags as sub-elements. Browsers do not display these HTML tags but use them to interpret the content of the page.

HTML contains two types of elements known as tags. One is the single tag like <img> that doesn't have a closing tag and the others called the pair tag that has an opening tag followed by a closing tag like <p></p>.

HTML can embed programs written in a scripting language such as JavaScript which affect the behavior and content of web pages.

HTML elements can also be divided according to their display property as in-line and block elements. Most of the elements such as headings, paragraphs takes up an entire row although their content may be much shorter. These type of elements are known as block elements while the other elements take up the space according to the width of their content such as image, audio, video elements. These sort of elements are called the in-line elements.

Here's the basic structure.

<!DOCTYPE html>
<html>
  <head>
    <title></title>
    <meta>
    <link>
    <script></script>
  </head>
  <body>

  </body>
</html>

All the contents are placed inside the <html> and </html> where the contents placed between <body> and </body> are only visible page content. The markup text <title></title> defines the browser page's title while all associative doccuments such as CSS and JS are placed inside the <head></head> tags.

Here's an example.

<html>
<head>
<title>Page title</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>


0 Like 0 Dislike 0 Comment Share

Leave a comment