HTML (Hypertext Markup Language) is a markup language used to create web pages. Any HTML page should follow certain rules to be properly displayed in web browsers: to declare proper Document Type, to include key components such as
Here is structure of primitive webpage described with HTML markup language:
<!DOCTYPE html> <html> <head> <title>This is a title</title> </head> <body> <p>Hello world!</p> </body> </html>
<!DOCTYPE html>is the Document Type Declaration (HTML5 version). If a declaration is not included, browsers will have issues with rendering webpage (so called "quirks mode").
<html>tag should frame the entire page. Tells the browser that this is an HTML document.
<head>tag contains various information, which is not visible on webpage but is important to web browser to correctly display and handle it. Usually it describes purpose, content and settings of webpage with
<title>element is one of such descriptive tags, which tells web browser how to name your webpage (visible as the name of the tab or window in browser).
<body>element is where actual webpage content is stored. In example above content of page presented as
<p>(paragraph) with text "Hello world!".