What is HTML?
HTML, or HyperText Markup Language, is the standard markup language used in creating webpages. It's the skeleton of any website and can be used to define the structure of your content. HTML consists of a series of elements, which you use to enclose or wrap different parts of the content to make it appear or act a certain way. Let's present how HTML is structured, elements used and present a simple example.
HTML Structure
An HTML document has a specific structure, which includes the following elements:
<!DOCTYPE html>
This declaration defines the document to be HTML5.
<html>
This is the root element of an HTML page.
<head>
This element contains meta-information about the HTML document, including the title.
<title>
This element specifies the title of the HTML document. The title is shown in the browser's title bar or tab.
<body>
This contains the content of the HTML document, such as text, images, links, etc.
HTML Elements
HTML elements are defined by start and end tags, with content in between. For example:
<p>My content</p>
to define paragraphs
<h1>My Title</h1>
to <h6>
to define headings by size
<a>
to define links
<img src="images/my_image.jpg />
to define images.
Note that some tags, such <img>
do not need their corresponding closing tag </img>
(in this case) since HTML 5, due to they do not have content inside, only attributes.
Each HTML tag might have attributes that define additional properties about them. For example, the <a>
tag uses the href attribute to determine the link's destination: <a href="www.google.com">Go to Google</a>
As we will see later, tags can be nested.
The rest of the content (6 read minutes) is restricted.
Please use your personal access token or register to access.