Skip to main content

HTML - Introduction

By SamK
0
0 recommends
Topic(s)

HTML - Hyper-Text Markup Language is the standard language for creating Web pages. 

HTML is used to describe the structure of a web page. 

An HTML page is built by combining a series of HTML elements. 

HTML elements tell browsers how to display the content. 

Example code for a simple HTML page:

<!DOCTYPE html>
<html>
    <head>
	    <title>Sample Page Title</title>
    </head>
	<body>
	    <h1>Sample Page Heading</h1>
	    <p>This is a sample pparagraph</p>
    </body>
</html>

Explanation:

<!DOCTYPE html> - This code defines that the current page is an HTML5 document.

<html> -This is the root element.

<head> - This is the head element, which is used to define page title and other hidden elements like meta information, CSS and JS codes, etc.

<title> - This tag defines the title of the web page, which is shown in the browser's title bar.

<body> - This defines the body of an HTML page and it contains all visible elements like headings, paragraphs, forms, tables, etc.

<h1> - This element defines the main heading of the web page.

<p> - This element defines a paragraph.

Each element in an HTML document has an opening tag and a corresponding closing tag, for example:

<body> </body> for body.

<h1> </h1> for headings.

<p> </p> for paragraphs.

This was a basic HTML introduction. Please check the links below for the next tutorial.

Questions & Answers