What Are Basic Text Markups in HTML

Text Markups are the basic tags used for formatting the layout of the text available in your document.


Now that we have the basic structure of an HTML document. Text is normaly organized into paragraphs in the body of a html document.

Take a look at the following code snippet.

<title>My first web page</title>
Hello World.
How is life?

After refreshing the browser you'd expect the new sentence appear in a new line but the fact is html ignores multiple white spaces. In order to split your texts into different paragraphs we use the <p></p> tag.

Change your two lines of content so that they look like this: <p>Hello World</p>
<p>How exciting</p>
The p tag is for paragraph. The two lines will now appear on two lines.


You can emphasise text in a paragraph using em and strong. These are two ways of doing pretty much the same thing, although traditionally, browsers display em in italics and strong in bold.

<p>Yes, that <em>is</em> what I said. How <strong>very</strong> exciting.</p>

Result of the code above:

Yes, that is what I said. How very exciting.

Line breaks

The line-break tag can also be used to separate lines like this:

<p>This is my first web page<br /> How exciting</p>

Result of the code above:

This is my first web page
How exciting

Preserving white spaces

Sometimes it is desirable to preserve the whitespaces in text, that is to browser from eliminating the multiple white spaces. This can be done using the <pre></pre> tag.

  and everyone       
    can code </pre></p>

Result of the code above:

Guys follow the various other tutorials to catch on further in html coding and designing!!!