HTML5: How to define a paragraph?
Solution:
HTML Code:
Explanation:
- The HTML code defines a simple webpage with a single paragraph.
- It includes a document type declaration (<!DOCTYPE html>) to specify that the document is an HTML5 document.
- Inside the <html> element, there's a <head> section containing metadata about the document, such as the character encoding (<meta charset="utf-8">) and the title of the webpage (<title>).
- The <body> section contains the actual content of the webpage, which in this case is a single paragraph (<p>).
- The paragraph contains the text "This is an HTML paragraph." which will be displayed on the webpage.
Live Demo:
See the solution in the browser
Supported browser
![]() |
![]() |
![]() |
![]() |
![]() |
Yes | Yes | Yes | Yes | Yes |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.