Showing posts with label HTML5. Show all posts
Showing posts with label HTML5. Show all posts

Thursday, 15 October 2020

Monday, 5 October 2020

Friday, 12 July 2019

What is Geolocation API in HTML5 ?


GEOLOCATION API






{need to be familiar with basic JavaScript in order to understand and use API.}

In HTML5 , the geolocation API is used to obtain the user's geographical location.

Since this can compromise user privacy the option is not available unless the user approve it.



example of geolocation request on a website


The geolocation API's main method is get current position; which retrieves the current geographic location of user's device.

[navigator.geolocation.getCurrentPosition();]→JavaScript

*PARAMETERS:


#ShowLocation(mandatory): Defines the callback method that retrieves location information.
#ErrorHandler(optional): Define the callback method that is invoked when an error occurs in processing the asynchronous call.
#Options(optional): Define a set of options for retrieving the location information.

❗The getCurrentPosition() method returns an object if it is successful. The latitude , longitude and accuracy properties are always returned.




*Presenting Data:

User location can be presented in two ways:

Geodetic & Civic.


  • The  geodetic way to describe position refers directly to latitude and longitude.
  • The Civic representation of location data is presented in a format that is more easily read and understand by the average  person.



{if you want to know more about this, then write in the comment box}

!!!THANKS!!!

Thursday, 6 June 2019

HTML 5


HTML 5

Html 5 have all the similar features with it's previous version but it also have some of the new and very important features that has completely revolutionaries the web page development.

NEW FEATURES INTRODUCED IN
HTML 5:-

HTML:-

H-HYPER(means a link which lets you to go from one webpage to another.).
T- TEXT
M- MARKUP(how you will lay down the text.).
L- Language

# Integrated API
(Application Programming Interface);

- Drag & Drop
- Audio & Video
- Offline web application
- History
- Local Storage
- Geaolocation
- Web messanging


#Content Model:

It refers to the set of the rules that define what type of content each element is allowed to have.
Mostly this translates into what other elements are allowed to be nested inside which other elements.

*Prior to modern HTML specifications, HTML elements were either block-level or Inline elements.
Modern HTML specifications split these two content models into Seven models. So things got a bit more complicated.
However in practical terms, you can still think of those seven model as a falling into same traditional categories: block-level and inline-level.

#Block-Level Elements:-

*Block-level elements render(i.e, are displayed) to being on a new line by default. You can change the behaviour with CSS.

*What that means that every time you specify a block-level element in HTML, the browser will automatically place the contents of the element on a new line in the flow of document.
*Block-level elements are allowed to wrap inline and other block-level elements.

#Inline Elements:-

*Inline render on the same line by default.

*Your code can have a whole bunch of inline elements, one after another. But they will all displayed on the same line. Having new line characters in the content or between the tags in your code won't manke any difference.

*Remember , HTML doesn't care about new line , chatacters , spaces, etc. All those space chatacters get translated into a single space anyway.

*Inline elements are restricted to only contain other inline elements. In other words, an inline element cannot have a block-level elements as part of it's content.


NOTE:
There are good reasons why there are actually seen category and not two.
Most of the reasons, however are Semantic in nature.
As you can see different seven category in the diagram. Each category has its own meaning which will well define the content of your HTML document.

#SEMANTIC:

It tells about the content it surrounded. What it tells you can be referring to importance of the content within a document or phrase , the description of that content.

Click on the given features of the HTML5 to know more about it:

# HTML 5 Web Storage

# Geolocation (one of most important feature of HTML5)