If user trying to create large size of paragraph it would be most terrible reading material forever in such cases user can alter the paragraph to change some characteristics as to
font size, justification, indentation, italics/bold/underlined text, margins, etc.
To perform style changes for the text, user should include some properties and values inside each
<p> tag. As a general syntax as shown below.
[html]
<p style="property: value;">some text here</p>
[/html]
The code below demonstrates to applying colors to the text as shown below.
[html]
<!DOCTYPE html>
<html>
<body>
<p>
The paragraph contains
several lines. <br/>
but the browser ignored these lines
and get displayed
in single line.
</p>
<p style="color: #00fdff;">
The paragraph contain
many blank spaces.<br/>
browser will ignored these
spaces and get displayed in
single line.
</p>
<p>
The number of lines in a paragraph depends on the size of the browser window. If you resize the browser window, the number of lines in thisparagraph will change.
</p>
</body>
</html>
[/html]
Result
By running the above code in a preferred browser user can get the following output as shown in below image.
For XHTML coding, user can utilize the different styles and properties to change some paragraphs into
bold, italics, or
underlined paragraphs inside the
tags. Following are the some styles to display the text in a paragraphs.
- style="font-style: italic;" ment for Italics Text.
- style="font-weight: intense;" ment for Bold Text
- style="text-improvement: underline;" ment for Underlined content
The code below demonstrates to applying the different styles to the text as shown below.
[html]
<!DOCTYPE html>
<html>
<body>
<p style="font-weight: bold;">SPLessons</p>
<p style="font-style: italic;">HTML</p>
<p style="text-decoration: underline;">XHTML</p>
</body>
</html>
[/html]
Result
By running the above code in a preferred browser user can get the following output as shown in below image.