Introduction to HTML
HTML : Hypertext Markup Language
- HTML consists of a series of elements
- HTML elements are represented by tags
- We can create a static website by HTML only.
<!DOCTYPE html>declaration defines this document
<html>element is the root element of an HTML
<head>element contains meta information about the document
<title>element specifies a title for the document
<body>element contains the visible page content
An HTML document is made up of tiny little pieces of HTML elements which are called tags. We have opening and closing tags and we can format them like this:
The closing tag follows the same format, only this time, we need to specify a slash after the less than sign, like so:
There are also self closing tags, they are almost identical to the standard closing tags, expect we have the slash before the greater than sign, for example to display an image, we would have to write:
There are of course certain words that should be between the less than and greater than signs, like
<body> each one telling the browser how to render it.