The HTML language is the foundational and essential language of websites and web applications. With HTML, you can define the structure of pages and organize their content. In fact, HTML is the standard markup language for creating web pages and is used for marking up content. The clauses and specific elements of this language simplify the interaction and engagement of users with different devices and systems.
One of the most important parts of HTML is its elements. These elements are defined using tags, and each tag has its specific meaning and usage. For example, the tag
is used for main headings, the tag
for paragraphs, and the tag for links.
In web design and development, a complete familiarity with HTML elements is necessary. HTML elements include commonly used tags like block, inline, and components. Each of these tags can have attributes like id, class, and style that modify their display in the browser.
In general, each HTML element consists of an opening tag in the format
and only have an opening tag and do not have content between them.
Now that we have reached this point, let's become familiar with several practical examples of HTML elements. Below are some of these elements accompanied by associated codes and their explanations.
<!DOCTYPE html>
<html>
<head>
<title>Example of HTML Elements</title>
</head>
<body>
<h1>This is a title</h1>
<p>This is a paragraph.</p>
<a href="https://example.com">This is a link</a>
</body>
</html>
Line by Line Description of Code:
<!DOCTYPE html>
: Declares the document type as HTML5 for the browser.<html>
: Starts the HTML document section.<head>
: Contains metadata and layout information for the page.<title>
: The title displayed in the browser tab.<body>
: Contains the main content and visible elements of the page, including text and components.<h1>
: The main heading of the page, typically the largest font size.<p>
: A paragraph of text on the page.<a href="https://example.com">
: A link to an external or internal page.