...

Web Technologies - HTML

Back to Course

Lesson Description


Lession - #140 HTML Elements


HTML Tag vs. Element

HTML elements consist of a starting tag and a closing tag if they contain other content. For example, <p>is the start and </p> is the end of a paragraph, but <p> This is a paragraph*</p> is an paragraph element.

Paragraph tag

The<p> tag allows you to break up your text into paragraphs. Each paragraph of text should be separated by an opening <p> and a closing </p> tag, as shown in the example below. –

Example


<!DOCTYPE html>
<html>

 <head>
      <title>Nested Elements Example</title>
 </head>
    
 <body>
      <h1>This is used for writing a simple text in <i>italic</i> </h1>
      <p>This is used to  <u>underline</u> paragraph</p>
 </body>


    
</html>