官术网_书友最值得收藏!

Basic HTML page concepts

Before we dive into the details of creating a map and adding layers of information you need to understand the context of where the code will be placed when you're developing applications with the ArcGIS API for JavaScript. The code you write will be placed inside an HTML page or JavaScript file. HTML files typically have a file extension of .html or .htm and JavaScript files have an extension of .js. Once you have created a basic HTML page you can then go through the necessary steps to create a basic map with the ArcGIS API for JavaScript.

The core of a web page is an HTML file. Coding this basic file is quite important as it forms the basis for the rest of your application. Mistakes that you make in the basic HTML coding can result in problems further down the line when your JavaScript code attempts to access these tags.

The following is a code example for a very simple HTML page. This example is about as simple as an HTML page can get. It contains only the primary HTML tags <DOCTYPE>,<html>, <head>, <title>, and <body>:

<!DOCTYPE html> 
<html> 
  <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
    <title>Topographic Map</title> 
   </head> 
  <body> 
      Hello World 
  </body> 
</html> 

There are a number of flavors of HTML currently in use. Most new HTML pages developed today use HTML5, so we'll focus on HTML5 throughout the book, but without delving into many of its advanced features. Other versions of HTML you are likely to encounter in the wild include HTML 4.0.1 and XHTML 1.0.

主站蜘蛛池模板: 碌曲县| 凌海市| 新化县| 本溪| 措美县| 巴林左旗| 太湖县| 汪清县| 丽江市| 邢台市| 英德市| 于田县| 牙克石市| 汕头市| 五华县| 黔江区| 昭通市| 察隅县| 汉中市| 红河县| 读书| 金山区| 平南县| 龙泉市| 商城县| 平顺县| 朔州市| 志丹县| 通化市| 高碑店市| 南溪县| 宝应县| 洛扎县| 华宁县| 濮阳县| 灵山县| 龙州县| 仁怀市| 大城县| 全州县| 五莲县|