HTML Attributes

Attributes provide additional information about HTML elements.


HTML Attributes

  • All HTML elements can have attributes
  • Attributes provide additional information about an element
  • Attributes are always specified in the start tag
  • Attributes usually come in name/value pairs like: name="value"

The href Attribute

HTML links are defined with the <a> tag. The link address is specified in the href attribute:

Example

<a href="http://www.mystronics.com/">This is a link</a>

You will learn more about links and the <a> tag later in this tutorial.



The src Attribute

HTML images are defined with the <img> tag.
The filename of the image source is specified in the src attribute:

Example

<img src="img_girl.jpg">


The width and height Attributes

Images in HTML have a set of size attributes, which specifies the width and height of the image:

Example

<img src="img_girl.jpg" width="500" height="600">

The image size is specified in pixels: width="500" means 500 pixels wide.

You will learn more about images in our HTML Images chapter.


The alt Attribute

The alt attribute specifies an alternative text to be used, when an image cannot be displayed.
The value of the attribute can be read by screen readers. This way, someone "listening" to the webpage, e.g. a blind person, can "hear" the element.

Example

<img src="img_girl.jpg" alt="Girl with a jacket">

The alt attribute is also useful if the image does not exist:


Example

What happens if we try to display an image that does not exist:
<img src="img_typo.jpg" alt="Girl with a jacket">


The style Attribute

The style attribute is used to specify the styling of an element, like color, font, size etc.

Example

<p style="color:red">I am a paragraph</p>


The lang Attribute

The language of the document can be declared in the <html> tag.
The language is declared with the lang attribute.
Declaring a language is important for accessibility applications (screen readers) and search engines:

<!DOCTYPE html>
<html lang="en-US">
<body>

...

</body>
</html>
The first two letters specify the language (en). If there is a dialect, use two more letters (US).


The title Attribute

Here, a title attribute is added to the <p> element. The value of the title attribute will be displayed as a tooltip when you mouse over the paragraph:

Example

<p title="I'm a tooltip">
This is a paragraph.
</p>


We Suggest: Use Lowercase Attributes

The HTML5 standard does not require lowercase attribute names.
The title attribute can be written with uppercase or lowercase like title or TITLE.
Mystronics recommends lowercase in HTML, and demands lowercase for stricter document types like XHTML.

We Suggest: Quote Attribute Values

The HTML5 standard does not require quotes around attribute values.
The href attribute, demonstrated above, can be written as:

Example

<a href=http://www.mystronics.com/>


Single or Double Quotes?

Double quotes around attribute values are the most common in HTML, but single quotes can also be used.
In some situations, when the attribute value itself contains double quotes, it is necessary to use single quotes:

<p title='John "ShotGun" Nelson'>
Or vice versa:
<p title="John 'ShotGun' Nelson">



Share:

Solitary Voyage.!

Planet earth, a sphere of hard rock where 7 billion people live, survive and die. Seven billion might sound colossal to us, when we constraint that to the scale of earth. We are here for each other and for one another. Let’s zoom out and look it in a cosmic perspective and watch out whether can we find any cosmic neighborhood.

To start, ever imagined how vast the universe is.? The radius of observable universe is some where around 48 billion light years approx. A light year is a distance travelled by light in one year which clocks at 300,000km/s. There exist billions of galaxies in which there are billions of stars and planets in our observable universe. Does that mean we would probably have a neighborhood somewhere who shakes and bake a cake with us. But the bitter fact is that we are all alone in this playground. We are yet to find a something like our planet where life can be survived.
We all do live on a planet which is precisely pointed out to be at a perfect distance from the sun where life can be survived which is called habitual zone. Little too close, we would be baked and too away from sun we would freeze. The primary source of life on earth is water and we are constantly looking for the marks of water on all the planets which we encountered. Is this the correct way of approach, because of the fact that we are only one way of survival. There may be species where it needs some other source to survive. This leads to a point where there may be life beyond our comprehension.
Can we ever find alienated neighbors, the probability to find or to meet is pretty low. Below are few points which would justify the statement.
  1. If there ever existed life on other planets, they might have much different and advanced resources than ours. If they quest for life, just like us it would be impossible to track us down and vice versa. Just like the WOW signal.
  2. The distances between the planets. Light commensurate at certain speeds. If someone has to find us, the light from our planet have to travel all the way long and reach their backyard. If the distance is billions and millions of lightyears away the point when our light reaches them, we would’ve passed million years forward and maybe our mankind will be vanished.
  3. Maybe aliens have are already visited us and we are unaware of that fact and still search for our neighbors. They may have considered us primitive and minuscule on compared to them and thought never to show up.
Life can be there in some part of the universe and we wish to meet them and in some point of time in near future. Until then, it's like a single human living on king of gods.!

Share:

The Illusion of Present

Image result for time travel


Have you ever had a feeling that we are living in the past than present. Is present really an instant occurrence or the we just living in a delusion that everything we sense is in present.
Let’s bind our vision in Cosmic scale and consider things for a moment . In universe, everything travels at some rate and which is approximately measurable. The fastest moving particle is the photon which represents a quantum of light. Light travels at 300,000km/s and in the same way sound travels certain speeds depending upon the temperature. When we gaze into the dark sky, we observe little dots called stars glittering in the vast cosmic arena. These stars are mindbogglingly away from us, like billions of light years away. Those tiny dots that appear in the sky, are the past images of that star. The light emitted by the star has to travel, those billion light year to reach us. The nearest star to the Earth, apart from our very own sun is Proxima Centauri, which is a part of Alpha Centauri tri-star system is around 4.36 million light years away from us. When we observe the star, we are actually looking into its past.
When we scale that down to the human level, the Sun and the moon, the light takes around approx., 8 minutes for the former and approx., 2sec for the latter to reach us. Even this article you’re reading, the light takes around 2nano seconds to reach your eye if the distance between you and the screen is 2 feet. We may not have witnessed Dinosaurs legacy, but the light of then dinosaurs era is still travelling in this vast space. If you build a telescope as big as earth and place at some million light years away from us, then you might have to chance to look back into the past.

As the process have been continuous and minute in human scale, we couldn’t observe the difference in our day to day life and spend our lives ignoring the details.
Past, Present and Future are the slabs of time-frames which we created, maybe we should bring it down to two.! ðŸ˜‰
Share:

Lets Search For Life. Become A Planet Hunter


Ever thought about how ancient people found all the planets in our solar system. Gone are those days when people gazed up at "wandering stars" later observers called them as planets. Now, astronomers are armed with radio telescopes, orbital observatories and many more hi-tech tools.

Before getting into planet hunting, our discussion starts with full of questions like Why? What? Where? How?

WHY WE ARE HUNTING PLANETS?

Image result for WHY

From the beginning  stage of the universe it's expanding day by day by creating new stars and planets. In some words we can say it as mass of the universe is increasing. So there is a chance of new planets formation.

WHAT MAKES US TO FIND PLANETS?
To find life. Yes, it's the unique reason what is making us to find planets. Every solar system have a habitual zone. Just think about our solar system, we are having a sun and there are planets around it. Mercury and Venus comes under hot zones and on the other side Jupiter, Neptune, and Saturn comes under cold zones. Earth and Mars comes under habitual zones. This is also another reason for searching life on Mars.


PLANET HUNTERS

Planet hunters is a mission to find planets using human eyes. Users analyse data from the kepler space telescope. The reason why NASA is using humans for planet hunting is we are best a recognizing patterns. Though we have computers with artificial intelligence we have to provide patterns at prior so, it is not possible as the light in space can have different patterns.
https://www.planethunters.org

The above link is NASA planet hunters website. After logging in to the site we can see some images of data collected by NASA kepler mission and we have to look at the data and see how the brightness of a star changes over time. Star's brightness data is represented as a graph and referred to a star's light curve. Those curves helps us in discovering new planets with the brightness of light decreasing when a planet pass through in front of it. 


DISCOVERIES

Over 12 billion observations have been analyzed. Out of those, 32 planets have possibility of life in them. 
Image result for planet hunters  
Share:

While Loop With User Input In Java


Share:

For Loop In Java


Share:

Switch Statements In Java


Share:

If and If Else Statements In Java


Share:

Comments In Java


Share:

Types Of Operators In Java


Share:

Variables Types and Data Types


Share:

Copyright © MYSTRONICS | Powered by Blogger
Design by SimpleWpThemes | Blogger Theme by NewBloggerThemes.com