Translate

Total Pageviews

HTML Style Attribute

 The HTML Style Attribute

Setting the style of an HTML element can be done with the style attribute.

The HTML style attribute has the following syntax:

<tagname style="property:value;">

Background Color

The CSS background-color property defines the background color for an HTML element.

Example

Set the background color for a page to powderblue:

<body style="background-color:powderblue;">

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>

Text Color

The CSS color property defines the text color for an HTML element:

Example

<h1 style="color:blue;">This is a heading</h1>
<p style="color:red;">This is a paragraph.</p>

Fonts

The CSS font-family property defines the font to be used for an HTML element:

Example

<h1 style="font-family:verdana;">This is a heading</h1>
<p style="font-family:courier;">This is a paragraph.</p>

Text Size

The CSS font-size property defines the text size for an HTML element:

Example

<h1 style="font-size:300%;">This is a heading</h1>
<p style="font-size:160%;">This is a paragraph.</p>

Text Alignment

The CSS text-align property defines the horizontal text alignment for an HTML element:

Example

<h1 style="text-align:center;">Centered Heading</h1>
<p style="text-align:center;">Centered paragraph.</p>

Chapter Summary

  • Use the style attribute for styling HTML elements
  • Use background-color for background color
  • Use color for text colors
  • Use font-family for text fonts
  • Use font-size for text sizes
  • Use text-align for text alignment

HTML Basic

 HTML Documents

All HTML documents must start with a document type declaration: <!DOCTYPE html>.

The HTML document itself begins with <html> and ends with </html>.

The visible part of the HTML document is between <body> and </body>.

Example

<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>

HTML Headings

HTML headings are defined with the <h1> to <h6> tags.

<h1> defines the most important heading. <h6> defines the least important heading: 

Example

<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>

HTML Paragraphs

HTML paragraphs are defined with the <p> tag:

Example

<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

HTML Links

HTML links are defined with the <a> tag:

Example

<a href="https://bestprovider4you.blogspot.com/">This is a link</a>

HTML Images

HTML images are defined with the <img> tag.

The source file (src), alternative text (alt), width, and height are provided as attributes:

Example

<img src="the best.jpg" alt="https://bestprovider4you.blogspot.com/" width="104" height="142">

HTML Introduction

 HTML is the standard markup language for creating Web pages.


What is HTML?

  • HTML stands for HyperText Markup Language
  • HTML is the standard markup language for creating Web pages
  • HTML describes the structure of a Web page
  • HTML consists of a series of elements
  • HTML elements tell the browser how to display the content
  • HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc.

A Simple HTML Document

Example

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>

Example Explained

  • The <!DOCTYPE html> the declaration defines that this document is an HTML5 document
  • The <html> element is the root element of an HTML page
  • The <head> the element contains meta-information about the HTML page
  • The <title> the element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab)
  • The <body> the element defines the document's body and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
  • The <h1> the element defines a large heading
  • The <p> the element defines a paragraph

What is an HTML Element?

An HTML element is defined by a start tag, some content, and an end tag:

<tagname>Content goes here...</tagname>

The HTML element is everything from the start tag to the end tag:

<h1>My First Heading</h1>
<p>My first paragraph.</p>

Start tag

Element content

End tag

<h1>

My First Heading

</h1>

<p>

My first paragraph.

</p>

<br>

none

none

Note: Some HTML elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag!

Flowers

 Dhp IV PTS: Dhp 44-59

Pupphavagga: Flowers


translated from the Pali by
Acharya Buddharakkhita
© 1996
Alternate translation: Thanissaro


44. Who shall overcome this earth, this realm of Yama, and this sphere of men and gods? Who shall bring to perfection the well-taught path of wisdom as an expert garland-maker would his floral design?

45. A striver-on-the path shall overcome this earth, this realm of Yama, and this sphere of men and gods. The striver-on-the-path shall bring to perfection the well-taught path of wisdom, as an expert garland-maker would his floral design.

46. Realizing that this body is like froth, penetrating its mirage-like nature, and plucking out Mara's flower-tipped arrows of sensuality, go beyond sight of the King of Death!

47. As a mighty flood sweeps away the sleeping village, so death carries away the person of a distracted mind who only plucks the flowers (of pleasure).

48. The Destroyer brings under his sway the person of distracted mind who, insatiate in sense desires, only plucks the flowers (of pleasure).

49. As a bee gathers honey from the flower without injuring its color or fragrance, even so, the sage goes on his alms-round in the village. 

50. Let none find fault with others; let none see the omissions and commissions of others. But let one see one's own acts, done and undone.

51. Like a beautiful flower full of color but without fragrance, even so, fruitless are the fair words of one who does not practice them.

52. Like a beautiful flower full of color and also fragrant, even so, fruitful are the fair words of one who practices them.

53. As from a great heap of flowers many garlands can be made, even so, should many good deeds be done by one born a mortal.

54. Not the sweet smell of flowers, not even the fragrance of sandal, tagara, or jasmine blows against the wind. But the fragrance of the virtuous blows against the wind. Truly the virtuous man pervades all directions with the fragrance of his virtue. 

55. Of all the fragrances — sandal, tagara, blue lotus, and jasmine — the fragrance of virtue is the sweetest.

56. Faint is the fragrance of tagara and sandal, but excellent is the fragrance of the virtuous, wafting even amongst the gods.

57. Mara never finds the path of the truly virtuous, who abide in heedfulness and are freed by perfect knowledge.

58. Upon a heap of rubbish in the road-side ditch blooms a lotus, fragrant and pleasing.

59. Even so, on the rubbish heap of blinded mortals the disciple of the Supremely Enlightened One shines resplendent in wisdom.

Where to paste the ad code in your HTML (ad units)

Code implementation guide

After you get and copy your ad unit code, you need to paste it between the <body> and </body> tags of your page. If you paste the ad code outside the <body> tags it will prevent your ads from appearing correctly.

Example HTML page before the ad unit code has been added

<html>
<head>
This is the head of your page.
<title>Example HTML page</title>
</head>
<body>
This is the body of your page.
</body>
</html>

Example HTML page with the ad unit code added in the body

<html>
<head>
This is the head of your page
<title>Example HTML page</title>
</head>
<body>
This is the body of your page.
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Homepage Leaderboard -->
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-1234567890123456"
data-ad-slot="1234567890"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

</body>
</html>
Note: This is sample code only, please don't use it in your own site's HTML.

Positioning the ads on your site with HTML

Just like the other elements of your site (images, paragraphs, etc.), you can change the position of your Google ads by using HTML tags (<div><table>, etc.). For example, if you surround your ad code with the HTML tags <div align="center"> and </div>, your ads will appear in the center of your page.

<html>
<head>
This is the head of your page
<title>Example HTML page</title>
</head>
<body>
This is the body of your page.
<div align="center">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Homepage Leaderboard -->
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-1234567890123456"
data-ad-slot="1234567890"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</body>
</html>
Note: This is sample code only, please don't use it in your own site's HTML.

The Mind

 Dhp III PTS: Dhp 33-43

Cittavagga: The Mind

translated from the Pali by
Acharya Buddharakkhita
© 1996
Alternate translation: Thanissaro

33. Just as a fletcher straightens an arrow shaft, even so, the discerning man straightens his mind — so fickle and unsteady, so difficult to guard.

34. As a fish when pulled out of water and cast on land throbs and quivers, even so, is this mind agitated. Hence should one abandon the realm of Mara.

35. Wonderful, indeed, it is to subdue the mind, so difficult to subdue, ever swift, and seizing whatever it desires. A tamed mind brings happiness.

36. Let the discerning man guard the mind, so difficult to detect and extremely subtle, seizing whatever it desires. A guarded mind brings happiness.

37. Dwelling in the cave (of the heart), the mind, without form, wanders far and alone. Those who subdue this mind are liberated from the bonds of Mara.

38. Wisdom never becomes perfect in one whose mind is not steadfast, who knows not the Good Teaching, and whose faith wavers.

39. There is no fear for an awakened one, whose mind is not sodden (by lust) nor afflicted (by hate), and who has gone beyond both merit and demerit. 

40. Realizing that this body is as fragile as a clay pot, and fortifying this mind like a well-fortified city, fight out Mara with the sword of wisdom. Then, guarding the conquest, remain unattached.

41. Ere long, alas! this body will lie upon the earth, unheeded and lifeless, like a useless log.

42. Whatever harm an enemy may do to an enemy, or a hater to a hater, an ill-directed mind inflicts on oneself a greater harm.

43. Neither mother, father, nor any other relative can do one greater good than one's own well-directed mind.

Heedfulness

 Dhp II PTS: Dhp 21-32

Appamadavagga: Heedfulness

translated from the Pali by
Acharya Buddharakkhita
© 1996
Alternate translation: Thanissaro

21. Heedfulness is the path to the Deathless. Heedlessness is the path to death. The heedful die not. The heedless are as if dead already. 

22. Clearly understanding this excellence of heedfulness, the wise exult therein and enjoy the resort of the Noble Ones. 

23. The wise ones, ever meditative and steadfastly persevering, alone experience Nibbana, the incomparable freedom from bondage.

24. Ever grows the glory of him who is energetic, mindful and pure in conduct, discerning and self-controlled, righteous and heedful.

25. By effort and heedfulness, discipline and self-mastery, let the wise one make for himself an island which no flood can overwhelm.

26. The foolish and ignorant indulge in heedlessness, but the wise one keeps his heedfulness as his best treasure.

27. Do not give way to heedlessness. Do not indulge in sensual pleasures. Only the heedful and meditative attain great happiness.

28. Just as one upon the summit of a mountain beholds the groundlings, even so, when the wise man casts away heedlessness by heedfulness and ascends the high tower of wisdom, this sorrowless sage beholds the sorrowing and foolish multitude.

29. Heedful among the heedless, wide-awake among the sleepy, the wise man advances like a swift horse leaving behind a weak jade.

30. By Heedfulness did Indra become the overlord of the gods. Heedfulness is ever praised, and heedlessness ever despised. 

31. The monk who delights in heedfulness and looks with fear at heedlessness advances like fire, burning all fetters, small and large.

32. The monk who delights in heedfulness and looks with fear at heedlessness will not fall. He is close to Nibbana.