How to Image Tag

Via Line25.com

Including Images in your Markup:

Well now that I have some content on my page, I want to include some images. Working with images is fairly straight-forward. In order for an image to appear on your web page, it has to be available online. This means that you should create a directory in your webspace called ‘images’ and you should upload all of your images there, then you can access them freely using HTML (see our tutorial on using FTP). The two favored formats for an online image is either .gif or .jpg (also called JPEG), but lately .png has also become somewhat standard.

Note: the ideal format for an image depends on how it was made. If you have an image that was made using a vector drawing program or has large blocks of continuous color, the best fit would be a .gif. If you are saving a photograph, your best fit would be a .jpg.

IMG Tag:

For a straight and simple insertion of an image into your code, use the following tag syntax:

<img src=https://www.yourDomainName.com/images/imageName.gif" alt="My website image" border="0">

The alt attribute is very important and should not be forgotten. It can be replaced with the title attribute and both give a description of your image in case it does not load for some reason. Both will also cause a ‘tool-tip’ or small text box to appear when a user’s mouse hovers over your image, so you can add more descriptive information if you wish.

I have put the border attribute within the image tag because when an image is included in a link (which we will be covering a bit later on) it places a default border on the image. It is a good habit to code a border of 0.

We looked at padding, margins, and floats in the last tutorial. We can also use these style declarations on an image.

Let’s look at our two column layout from the last tutorial and add some images using the <img> tag.

Here is the HTML:

<div id="wrapper">
<div style=”width: 768px; background-color: #b6c39a; border: 1px solid #000000; border-bottom-width: 0px; text-align: center “><img src=”https://photos.bravenet.com/166/366/683/3/4B3DA81507.gif” border=”0″></div>
      <!--this is the section on how I found billie -->
      <div class="column">
         <h1>How it Started</h1>
         <img src="https://photos.bravenet.com/166/366/683/3/F88EB5A65E.gif" border="0" style="float: right; margin-left: 5px;">
         <p>It was a warm sunny spring day in Pedro Ohio when a colleague and I went to a local farm to ask if we could do some surveys on the <em>'crick'</em> that ran through the back of their property. </p>
         <p>The farmer who owned the land approached us with a jocular, gap-toothed smile and asked us "do y'all like puppies?". I responded with a tentative "yyeeesss -why?" "Well..." he said, "my girlfriend found this puppy out in the back forty, and I'm a gonna have-ti shoot it... that is... unless you want it." I responded immediately with "don't shoot the little puppy, I will come back for it at the end of the day."</p>
         <p>This is the story of how I found Billie-Mae. When I went back to pick her up she was a tiny five week old puppy, bloated with worms, covered in lice, ticks and fleas, starving, with a puncture hole through one eyeball.</p>
      </div>
      <! - this is the section on how she turned out -->
      <div class="column" style="margin-left: 16px;">
         <h1>How it Turned Out</h1>
          <img src="https://photos.bravenet.com/166/366/683/3/AF337E590C.gif" border="0" style="float: right; margin-left: 5px;">
         <p>With time and care and a lot of flea baths, Billie's hair grew back in the soft velour of most puppies. The local vet told me that she was a very special dog because of her genetic history. The story in that area is one of dog over-population due to a general lack of spaying and neutering. </p>
         <p>Dogs run wild <em>-literally</em>. According to the vet, Billie-Mae is about a sixth generation wild dog. After this period of interbreeding and feral living she has become just like many other dogs in the world who are feral. They develop common characteristics such as medium height, stocky chest, pointy ears and curly tail. I like to call her my "Yankee Dingo".</p>
         <p>Apart from a few allergies she has turned out to be quite healthy and vivacious despite her rough start.</p>
      </div>
</div>

Since we have an embedded style sheet, I’m going to give those images a class name and take the inline style out.

<img class="billieImage" src="https://photos.bravenet.com/166/366/683/3/AF337E590C.gif" border="0">

I’ll do the same for my div tag containing the header image:

<div id="header"><img src="https://photos.bravenet.com/166/366/683/3/4B3DA81507.gif" border="0"></div>

So my style rule for class name billieImage will be:

.billieImage { float: right; margin-left: 5px;}

But we learned a quicker way when we were dealing with Divisions and Paragraphs so let’s use the same method for the ‘.billieImage’ elements. I remove the class and style attributes from the IMG tag and use the class from the division named ‘column’. My style declaration will look like the one for my paragraph.

.column img { float: right; margin-left: 5px;} - Much quicker and cleaner.

The rule for id header will be:

#header {width: 768px; background-color: #b6c39a; border: 1px solid #000000; border-bottom-width: 0px; text-align: center;}

I will leave the header id alone as it defines only one instance and can’t be grouped with the others.

Note: Why did I wrap my header image in a div? Well the width of my website is 770px, but my image was only 760px, so I added a div with the same background color and centered it. Just a little trick. I removed the bottom-border because there was already a top border on my navigation.

 

Source : https://resources.bravenet.com

cara men- Charger baterai smartphone agar tahan lama

Cara Tepat Mencharge Baterai Smartphone

via : Ponselbaru.net

1. Jangan menunggu sampai baterai sampai habis total
Jangan pernah membiarkan baterai Anda habis hingga mati total atau nol persen. Berbeda dengan baterai zaman dulu yang berbasis nikel, jika Anda melakukan charge baterai li-ion atau li-polimer sampai smartphone mati total, justru akan memperburuk kualitasnya dan memperpendek umur baterai. Karena, dalam waktu yang sama, proses charge baterai dari 0-50% akan memakan daya yang lebih besar dibandingkan charge dari 50-100%.

2. Gunakan charger yang tepat
Meski smartphone Anda bisa menggunakan charger yang berasal dari merek lain, sebaiknya usahakan untuk tetap menggunakan charger bawaannya. Hal tersebut untuk mencegah baterai terisi melebihi kapasitas dan bisa menyebabkan baterai Anda meledak. Selain itu, charger bawaan smartphone saat ini biasanya sudah pintar, yang sudah mengusung fitur auto current cut, yang memutus arus ke baterai ketika baterai sudah penuh.

3. Jangan melakukan isi ulang baterai hingga penuh
Selain jangan menunggu sampai baterai habis total, begitu pula saat Anda melakukan charge. Cara terbaik menjaga baterai lithium-ion atau lithium-polimer pada smartphone bertahan hingga lama adalah mencabut charger sebelum baterai Anda benar-benar penuh dan menjaga baterai di sekitar angka 40-80%. Meski saat ini baterai smartphone sudah bisa menghentikan charge saat sudah terisi penuh, sebaiknya hindari berlama-lama melakukan charge karena bisa membuat baterai menjadi panas atau menggelembung.

4. Matikan saat melakukan charge
Semakin banyak cycle (charge, pakai, charge, pakai) akan semakin memperburuk kinerja baterai. Untuk itu, sebaiknya matikan perangkat saat baterainya diisi ulang atau setidaknya saat berada dalam mode sleep.

5. Hindari tempat panas
Sebab, salah satu musuh utama baterai li-ion dan li-polimer adalah panas. Jadi, sebisa mungkin Anda menghindari perangkat smartphone dari tempat panas. Meskipun dalam keadaan matisekalipun, hal ini sangatlah berbahaya kareana panasnya suhu dapat merusak komponen yang ada di dalam baterai.

6. Jangan Membiasakan meng-Charge Semalaman
Kebiasaan ini memang kurang baik bagi perangkat Smartphone, meski kini beberapa Charger bisa dengan sendirinya memutuskan arus listrik jika daya sudah terisi 100 persen. Membiarkan kondisi baterai dalam keadaan 100% terus menerus pun tidak begitu baik. Mengisi baterai hingga kondisi 100% secara berkali- kali justru lebih baik disbanding dengan terlalu sering membiarkan baterai berada pada kondisi 0% atau 100% secara terus- menerus.

Source: Pintarkomputer.com