Wednesday, June 29, 2016

HTML and CSS


  Links


Creating links between pages

Relative URLs – Relative to the present directory
<a href = “../index.html” > relative URL index </a>
When you refer a folder, the index.html is listed.
In some servers when index.html is not present, then the directory content is listed

E-mail links:    

<a href=”mailto:john@sample.com” > Click here to mail john </a>

Opening links in new window: 

<a href=www.google.com target="_blank"> Open Google </a>

Linking to a specific part in same page:

Provide ID to the heading tag
For example: <h1 ID = "Aerospace"> Aerospace </h1>
When you refer in anchor tag: <a href="#Aerospace"> About Aerospace </a>
How about linking to specific part in another page:
<a href="htmlbooks.com/#bottom> HTML and CSS section </a>.
Now, bottom is the ID tag available in the web page.


Images

> How to add Images to web page?
 You can use the background-image property of the CSS to add
 You can use the <IMG> tag to add images
 <IMG src="ratsand bats.jpg" title="About Rats and Bats" alt="This image details the behaviour of rats and bats in night"  />

> Where to place the image in your web page?
  1. Before the paragraph
  2. Inside the start of the paragraph
  3. In the middle of the paragraph

<p>
   <IMG src="images/bird.gif" align = "left" />
   There are around 10,000 birds living in this area that has inhibited the ecosystems in different space.
</p>

<hr />

<p>
   <IMG src="images/bird.gif" align = "right" />
   There are around 10,000 birds living in this area that has inhibited the ecosystems in different space.
</p>


> 3 Rules of image
  1. Save image in right format.
          Images involving many colours - JPEG
          Iconic images - GIFF or PNG
  2. Save images in right format (PNG, GIFF, JPEG)
  3. Use the correct resolution

> How do I optimise the images for best view on my web page?


Sunday, April 10, 2011

Yesterday, it was nice sunny weather. I set out for sailing with my house mate and friend - Karel. He has a boat and membership in DMYC club. When we reached the boat,it was very windy so we used only JIP for sailing rather than sail. I went in front of the boat as a captain and relished the beauty of scenery. I sat down for a moment to relax myself. Suddenly, I realized that it is also a good place for sleeping. I held one side of the boat strongly to safeguard myself from falling into cold sea water and fell asleep. I woke up back when I am back to Harbor.

We worked very hard in the boat again to park it back in harbor. We felt very hungry and stepped in the pizza house. Fortunately, there was an half-prize offer to grab. We bought the pizzas for half price and went back to the club coffee shop where we had the pizza. While eating pizza, we noticed that a child was interested in pizza. Karel gave a piece to the child, who ate it happily.

We came back to house and went out for a walk in the ground nearby our house. There were few street dogs barking at us, while walking. We ignored and continued to walk silently. We bought a milk packet in spar, which is near walking path. We came back home with a wonderful experience.