Introduction

HTML (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. "Hypertext" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.

HTML uses "markup" to annotate text, images, and other content for display in a Web browser. An HTML element is set off from other text in a document by "tags", which consist of the element name surrounded by "<" and ">". The name of an element inside a tag is case insensitive. That is, it can be written in uppercase, lowercase, or a mixture. For example, the <title> tag can be written as <Title>, <TITLE>, or in any other way.

Headings

Avoid skipping heading levels: always start from <h1>, followed by <h2> and so on. Use only one <h1> per page or view. It should concisely describe the overall purpose of the content.

Example-

<h1>Heading level 1</h1>
<h2>Heading level 2</h2>
<h3>Heading level 3</h3>
<h4>Heading level 4</h4>
<h5>Heading level 5</h5>
<h6>Heading level 6</h6>

Heading level 1

Heading level 2

Heading level 3

Heading level 4

Heading level 5
Heading level 6

Displaying Text

The <p> represents a paragraph. Paragraphs are usually represented in visual media as blocks of text separated from adjacent blocks by blank lines and/or first-line indentation, but HTML paragraphs can be any structural grouping of related content, such as images or form fields. Paragraphs are block-level elements, and notably will automatically close if another block-level element is parsed before the closing </p> tag.

Example-

<p>This is a paragraph.</p>

This is a paragraph.

Lists

The <ul> and <ol> elements may be nested as deeply as desired. Moreover, the nested lists may alternate between <ol> and <ul> without restriction. The <ol> and <ul> elements both represent a list of items. They differ in that, with the <ol> element, the order is meaningful. As a rule of thumb to determine which one to use, try changing the order of the list items; if the meaning is changed, the <ol> element should be used, otherwise you can use <ul>.

Examples-

<ul>
<li>first item</li>
<li>second item</li>
<li>third item</li>
</ul>
  • first item
  • second item
  • third item
<ol>
<li>Fee</li>
<li>Fo</li>
<li>Fum</li>
</ol>
  • Fee
  • Fo
  • Fum

Baisc Styling

emphasize

The <em> element is for words that have a stressed emphasis compared to surrounding text, which is often limited to a word or words of a sentence and affects the meaning of the sentence itself.Typically this element is displayed in italic type. But it is different from using CSS style rule to make italic.

strong

The <strong> element is for content that is of "strong importance," including things of great seriousness or urgency (such as warnings). This could be a sentence that is of great importance to the whole page, or you could merely try to point out that some words are of greater importance compared to nearby content.Typically this element is rendered by default using a bold font weight. However it's not the same as using bold styling or <b> tag.

Example-

<p>In <strong>HTML 5</strong>, what was previously called <em>block-level</em> content is now called <em>flow</em> content.</p>

In HTML 5, what was previously called block-level content is now called flow content.

Reference

Complete documentation has been taken from DevDocs.