0% found this document useful (0 votes)
30 views5 pages

The HTML Element Defines A Paragraph: Example: HTML Coding HTML Paragraphs

The document discusses various HTML elements including paragraphs, styles, text formatting, quotes and citations, comments, and colors. Paragraphs are defined with <p> tags and ignore whitespace and lines in the source code. Styles are defined with inline CSS to change text properties. Formatting tags like <b> and <i> make text bold or italic. Blockquotes display quoted text and can cite their source. Comments are not displayed in browsers and start with <!--. Colors can be specified by name, RGB, HEX, HSL, RGBA, or HSLA values.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views5 pages

The HTML Element Defines A Paragraph: Example: HTML Coding HTML Paragraphs

The document discusses various HTML elements including paragraphs, styles, text formatting, quotes and citations, comments, and colors. Paragraphs are defined with <p> tags and ignore whitespace and lines in the source code. Styles are defined with inline CSS to change text properties. Formatting tags like <b> and <i> make text bold or italic. Blockquotes display quoted text and can cite their source. Comments are not displayed in browsers and start with <!--. Colors can be specified by name, RGB, HEX, HSL, RGBA, or HSLA values.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

HTML CODING

HTML Paragraphs
The HTML <p> element defines a paragraph:
Example
<!DOCTYPE html>
<html>
<body>
<p>
This paragraph
contains a lot of lines
in the source code,
but the browser
ignores it.
</p>

<p>
This paragraph
contains a lot of spaces
in the source code,
but the browser
ignores it.
</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 this paragraph will
change.
</p>
</body>
</html>
HTML Styles
Example
<!DOCTYPE html>
<html>
<body>

<p>I am normal</p>
<p style="color:red;">I am red</p>
<p style="color:blue;">I am blue</p>
<p style="font-size:50px;">I am big</p>

</body>
</html>

HASILNYA
I am normal
I am red
I am blue
I am big
HTML Text Formatting
EXAMPLE
<!DOCTYPE html>
<html>
<body>
<p><b>This text is bold</b></p>
<p><i>This text is italic</i></p>
<p>This is<sub> subscript</sub> and <sup>superscript</sup></p>
</body>
</html>
HTML Quotation and Citation Elements
<!DOCTYPE html>
<html>
<body>

<p>Here is a quote from WWF's website:</p>


<blockquote cite="http://www.worldwildlife.org/who/index.html">
For 50 years, WWF has been protecting the future of nature.
The world's leading conservation organization,
WWF works in 100 countries and is supported by
1.2 million members in the United States and
close to 5 million globally.
</blockquote>

</body>
</html>

HASILNYA

Here is a quote from WWF's website:


For 50 years, WWF has been protecting the future of nature. The world's
leading conservation organization, WWF works in 100 countries and is
supported by 1.2 million members in the United States and close to 5
million globally.
HTML Comments
Example :
<!DOCTYPE html>
<html>
<body>

<!-- This is a comment -->


<p>This is a paragraph.</p>
<!-- Comments are not displayed in the browser -->

</body>
</html>

Hasilnya
This is a paragraph.
hTML Colors

HTML colors are specified using predefined color names,


or RGB, HEX, HSL, RGBA, HSLA values.
Examples
<!DOCTYPE html>
<html>
<body>

<h1 style="background-color:Tomato;">Tomato</h1>
<h1 style="background-color:Orange;">Orange</h1>
<h1 style="background-color:DodgerBlue;">DodgerBlue</h1>
<h1 style="background-
color:MediumSeaGreen;">MediumSeaGreen</h1>
<h1 style="background-color:Gray;">Gray</h1>
<h1 style="background-color:SlateBlue;">SlateBlue</h1>
<h1 style="background-color:Violet;">Violet</h1>
<h1 style="background-color:LightGray;">LightGray</h1>

</body>
</html>

HASILNYA

Tomato

You might also like