"HTML5 e CSS3 - Módulo 2"
Paragraph <p> tag

"Curso em Vídeo"
This is the student's notebook of Ricardo Barros Becheli

Paragraph <p> tag

The <p> tag defines a paragraph. Browsers automatically add a single blank line before and after each <p> element.

A paragraph is marked up as follows:

paragraph tag code

The <p> tag supports both Global Attributes and Event Attributes in HTML.

Small problems you have to overcome with paragraphs:

This paragraph contains a lot of lines in the source code, but the browser ignores it. Look at the code:

Poems have the same problems in HTML:

My Bonnie lies over the ocean. My Bonnie lies over the sea. My Bonnie lies over the ocean. Oh, bring back my Bonnie to me.

paragraph-bonnie-p-code

One way of solving it is replacing the <p> tag for the <pre> tag. Let's do it and look at the code below:

                My Bonnie lies over the ocean.
                My Bonnie lies over the sea.
                My Bonnie lies over the ocean.
                Oh, bring back my Bonnie to me.
            
paragraph-bonnie-pre-code