Главная страница Случайная страница КАТЕГОРИИ: АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторикаСоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника |
An HTML Crash Course
Covering HTML and Javascript in depth is beyond the scope of this tutorial, but a quick crash course for absolute beginners will provide enough understanding to be very useful. To learn more than basic HTML, search Google for " HTML tutorial", " javascript tutorial", and for topics such as " mobile ui framework" - there are thousands of resources for developers with every level of experience. HTML is the layout language used to format text and GUI elements on all web pages. HTML is not a programming language - it cannot evaluate conditional expressions, it has no facility to control phone hardware such as sensors, camera, etc., it can't process or manipulate data in any useful way, etc. It's simply a markup format that allows you to shape the visual appearance of text, images, and other items on pages viewed in a browser. RFO Basic allows you to manipulate data and control the phone hardware, so the two are a perfect compliment to one another. Tags In HTML, items on a web page are enclosed between start and end " tags": < START TAG> Some text or graphic element on a web page< /END TAG>There are tags to effect the layout in every possible way. To bold some text, for example, surround it in opening and closing " strong" tags: < STRONG> some bolded text< /STRONG>The code above appears on a web page as: some bolded text. To italicize text, surround it in < i > and < / i > tags: < i> some italicized text< /i>That appears on a web page as: some italicized text. Notice that every < opening tag>in HTML code is followed by a corresponding < /closing tag>The closing tag starts with the " /" character. Some tags surround all of the page, some tags surround portions of the page, and they're often nested inside one another to create more complex designs. To create a table with three rows of data, do the following: The above code produces the following result:
Notice that the entire table above is enclosed in opening and closing < T A B L E > tags, and each row is enclosed in opening/closing < T R > (table row) and < T D > (table data) tags. A minimal format to create a web page is shown below. Notice that the title is nested between " head" tags, and the entire document is nested within " HTML" tags. The page content seen by the user is surrounded by " body " tags: < HTML> < HEAD> < TITLE> Page title< /TITLE> < /HEAD> < BODY> A bunch of text and < i> HTML formatting< /i> goes here... < /BODY> < /HTML>If you save the above code to a text file named " yourpage.html" in /sdcard/rfo-basic/data/ on your Android devive, and surf to file: ///sdcard/rfo-basic/data/yourpage.html, you'll see in your browser a page entitled " Page title", with the text " A bunch of text and HTML formatting goes here...". All web pages work that way - this tutorial is in fact just an HTML document stored on the author's web server account. Click View -> Source in your browser, and you'll see the HTML tags that were used to format this document. This document is simply saved on a server which is publicly available at the https://rfobasic.com URL.
|