Hypertext Markup Language (HTML) 


Мы поможем в написании ваших работ!



ЗНАЕТЕ ЛИ ВЫ?

Hypertext Markup Language (HTML)



In order to clarify the idea of ​​organizing an HTML document, it is appropriate to give an analogy with the work of the editor of a publisher who prepares those texts for layout. The editor has the source text and makes its markup, in which it notes how to format certain elements and how to change the order of paragraphs. For example, it can be notes like: "print this paragraph in bold, such-and-such sentence highlighted in red, and after the paragraph such-and-such, insert text from the page such-and-such." The typesetter reads the editor’s comments and displays the final version of the document in the form in which it will later be printed.

Similar comments are written in the HTML document, then they are read by the browser so that the browser “knows” how to display the data on the computer screen.

We can say that the browser performs the formatting of the document on the basis of a set of instructions contained in the HTML, and from the ability to display information specific computer. For example, if there is no font on the computer that is required to display this or that text, another suitable one will be used. font from an available set.

In addition, users have the ability to change browser settings so that the document is displayed in the optimal way. For example, in the browser settings, you can specify the color selection rules for displaying the background of the document or specify what color text hyperlinks should be highlighted. Obviously the same HTML document will be reflected by browsers with different settings in different ways.

Teams HTML (or control markers of a hypertext document) are called tags (from English. tag - label, marker).

A unified set of predefined tags allows you to use different browsers. HTML can be used not only for development Web pages. For example, it can be used to present documents on a CD.

There are more than a hundred tags for marking up information on Web page. Most tags are used in pairs. The opening and closing tags begin and end with the signs <and >. The closing tag differs from the opening tag by the presence of the symbol "/" (slash) before the keyword. For example, a pair of < b >... </ b > tags is used to instruct the browser to display text placed between the tags in bold, and the < i >... </ i > tags indicate that when displayed text should be applied in italics. The opening and closing tags act on the part of the document enclosed between them.

One of the most important tags is a tag that defines hyperlinks. When defining a hyperlink, you must associate an element Web pages according to which the transition will take place, with the address of the transition. For this purpose, a pair of which begins with a tkryvayuschego tag < a >, by the first letter of the word anchored (from the English. "tied"), and ends with the closing tag </ a >.

The transition address is determined by the value of the href attribute and represents URL of the resource pointed to the link. So in the simplest case hyperlink definition looks like:

< a href = " URL "> link name </ a >

Web server mechanism

Defining the concept of language HTML, you can describe in more detail the mechanism of work Web server and browser. Consider an example of accessing the resource www.translate.ru (Fig. 4.12).

 

Fig. 4.12. Web server operation diagram

 

In the address bar of the browser we type the necessary URL (Figure 4.12, paragraph 1), after which the browser receives information about the protocol used (http) and server name (www.translate.ru). Browser sets connection with the sought Web server and using HTTP protocol, requests the requested resource. Server sends to browser HTML page that is stored on the server (Fig. 4.12, point 2).Usually even simple The web page contains not only text, but also graphics, i.e. consists of several files of different types. Browser reads HTML tags, recreates the page on the computer screen, and we see the result of our request (Fig. 4.12, paragraph 3).

In this case, we examined an example of how the so-called static pages work.

Static pages are an exact copy of files in directories Web- servers, and do not change until the developer does not change something in them. However, pages can be generated dynamically, i.e. during request processing for some program, and not from a finished file on disk. You probably came across the pages that were created dynamically at your request - as they say, "formed on the fly." For example, any book of reviews on The website provides a specific form in which you add your text, the next time you open this page, it contains a new message.

Similarly, when a search engine is given inquiry on the occasion of a document, and it gives list of links obviously this the list was formed precisely for this request, but not stored on the web in advance.

Web Caching

Looking through Web resources, many probably faced the fact that individual pages load much more slowly than others. Often a document is delayed if the server from which it is downloaded has a low-speed output channel to Internet or working in overload mode. The question arises - how to speed up the download. One solution is to not download data from remote servers for several times.

When navigating to Web often arises the need, as in a book, to " turn the page back", i.e. reload it. Obviously, when you click the "Back" button in your browser in order to return to the previously viewed static page, there is no point in re-downloading it from the server. It is logical to save the viewed document on the computer disk in a special buffer zone (cache) and quickly display it if user wants to return follow the links back. This is exactly what modern browsers do.

In modern browsers (such as Internet Explorer and Netscape Navigator) it is possible to configure the size of the folder in which cached documents are saved.

Web Helper Tools

Most novice users who access the Internet use a standard set of features. Windows and browser Internet Explorer, believing that these programs provide the solution to all problems when working with Web resources. However, it is not. Exist A number of useful programs complementing the capabilities of an omnipotent browser are offline browsing tools, analysis tools for updating information on specific sites, translators, etc. Briefly dwell on the principles of operation of these programs.

Web Browsing Tools

One of the main tasks performed when working in the Web, - this view and further copying pages on the user's local disk. Using a normal browser, the user has to download the page, then copy it and go to the next link. If necessary, copy all the documents of a large site, this work translates into a separate problem. When copying a large number of pages, a lot of time is required and omissions and errors are inevitable. This approach leads to inefficient use of network time. Therefore, if you use a resource that is rarely updated, it is much more profitable to download it to your hard drive once and view it locally, while the speed of access to information will be much higher.

In other words, this is convenient if the user needs information presented in relatively large blocks.

The programs mentioned above are called offline browsers or Internet vampires.

When downloading a large number of documents, an offline browser can be more effective due to the ability to simultaneously download files from multiple pages at once.

The function of the offline browser can be compared with the library service, which provides the ability to copy part of the library stock and take it home to work in a more operational mode (Fig. 4.13).

 

 

 

Fig. 4.13. In the library you can order and read individual documents, or you can get a whole archive at home

 

When copying information from the Web to the hard drive, certain problems with hyperlinks may occur. Obviously, it is far from always possible to copy all the documents referenced by the pages of a certain site. So that individual links will remain inoperative. Moreover, as you know, absolute links point to specific URLs. When you copy Web pages to a local computer, their addresses will change and absolute links will stop working offline. Thus, in order to make an offline copy, you must reconfigure the hyperlinks in the copied documents. In this case, in the copy of the Web site on the local computer, the structure of the relationship of documents of the source site can be recreated, however, the copy for offline viewing will no longer be a mirror copy of the website from which the copy was made.

There are a number of offline browsers. Among the Russian products, the DISKoKachalka company DISKo (www.disco.ru) should be mentioned. One of the most common programs of this class is the relatively new and at the same time popular WebZip program from Spidersoft (www.spidersoft.com). Its main advantage lies in the ability to create ZIP archives of downloaded files. Naturally, this allows much more efficient use of disk space. WebZip has a built-in browser that allows you to view Archived pages without unpacking them.

 

Internet translators

One of the most effective applications of translation programs is to translate pages when navigating the Web.

When a user searches the Internet for sites on a certain topic and accesses resources in different languages, the main task here is to understand what the site is about and decide whether to study the contents of this site or not. In this case, the translation program is simply irreplaceable.

You can make a transfer directly to online. To do this, just go to the online translation site of the PROMT company, which is located at www.translate.ru.

This service operates as follows. The user accesses the resource www.translate.ru, where he is provided with a form (Fig. 4.14, paragraph 1). In this form, the user indicates the address of the Web page whose translation he wants to receive, selects the direction of the translation, indicates the subject in order to select the appropriate thematic dictionary during the translation. Next, from the server www.translate.ru (point 2), we go to the Web server on which the desired page is located (point 3), then it is translated on the server www.translate.ru, and the finished result is in the form of a translated page (point 4) sent to the client. Note that the service www.translate.ru is free.

 

 

 

Fig. 4.14. Scheme of the service www.Translate.ru

 

Web Site Tools

Service popularity WWW is largely determined by the fact that users can not only view sites, but also create their own. Process of creation and functioning The web site is illustrated in the diagram shown in fig. 4.15. Each site has a developer who prepares source materials on his computer: graphics, media data (sound, animation), using the appropriate editors, and directly develops website using this or that HTML editor. Usually the site is developed on a local computer, tested, and then transferred to Web - server using FTP protocol. After publication, the material becomes available to all visitors. If users have the right only to view the site, then the developers have the opportunity to update and change the contents of their site.

In principle, the development of sites is the subject of a separate book, but we will touch on this topic only in the most general form.

It should be noted that create HTML document can be used with a regular text editor. For example, using the in Windows program Notepad. In this case, the developer writes HTML code from scratch without using templates or hints. Despite the fact that the text editor does not provide any auxiliary tools, many professionals claim to use The HTML editor is Notepad.

Of particular note office applications. As already mentioned, all Microsoft Office applications can save the result of work in HTML format. Many home users choose Microsoft Word as simple development tools Web pages. True, HTML in this case will not be optimal.

 

 

 

Fig. 4.15. Web site development and browsing diagram

 

When you save documents in HTML format with Microsoft Word, additional tags are added to it, so that later you can use all the functionality Word for further work with the contents of the document.

In order to reduce the size Web pages in Word 2003 can save data in a special filtered format (filtered HTML), in this case the extra tags will be deleted.

True, if you open Web page saved in filtered HTML in the program Word, probably some editing features of this document will be lost. Therefore, you should use the mode filtered HTML is only in its final stages, before being translated directly into The HTML.

Despite the fact that the simple Web pages can be created without the help of specialized HTML editors, it’s impossible to develop and support more or less reputable sites without them.

All available on the market HTML editors can be divided into two large groups:

• programs that incorporate visual editors (design-based editors) - tools that automatically generate the necessary HTML code, allowing you to design web pages in WYSIWYG (What You See Is What You Get - what I see is what I get);

• editor programs that provide an editor and auxiliary tools for automating code writing (code-based editors).

The computer press often discusses the question of which approach is better - visual or based on writing code, and each of the methods has supporters and opponents.

Proponents of visual editing prefer this approach because of the simplicity, visibility and accessibility for a wide audience of novice users.

Proponents of coding are convinced that only manually can we create the optimal code and that software markup is more accurate than visual. Those who prefer to create a website manually criticize editors who provide ready-made form templates and templates for their uniformity.

It should be borne in mind that today many users (of different levels of training) are engaged in creating their own sites and need different by degree of complexity of products. Some users need a product "for growth", others want to create a two-page personal site and never return to this.

Finally, we note that there are compromise solutions: for example, the already mentioned Microsoft FrontPage and Macromedia Dreamweaver have not only visual means, but also highly developed code editors. In the latest version FrontPage 2003 even has dual mode, in which the user can observe how the actions of the visual editor lead to code changes.

It is obvious that the higher the professionalism of the user, the less ready-made templates, layouts and tips he needs.

Note that the choice between the speed of development and the individuality of style is relevant not only for building sites, but also for ordinary construction. More types of buildings can be built from bricks than from panels with ready-made openings for windows and doors, but this also requires other efforts (Fig. 4.16).

 

 

 

Fig. 4.16. Site building can be compared to conventional construction. Panel houses are built faster, but brick houses allow you to implement innovative ideas

 

So simple a text editor is an indispensable tool for Web designer thoroughly knowledgeable HTML, but not very useful for a person who is not going to learn The HTML. Consider the most popular editors.

FrontPage 2003

Developer: Microsoft

Program website: www.microsoft.com/frontpage

Microsoft FrontPage is an easy-to-learn and convenient Web-editor for designing, preparing and publishing Web sites. Thanks to integration with the MS Office product family, familiar interface and an abundance of templates, the program allows you to quickly master the work even for novice users if they are familiar with the basics of working in MS Word. Wherein FrontPage cannot be called a "beginner's solution": the program provides extensive functionality and a variety of tools for optimizing team development, and also allows you to quickly create dynamic integrated Web sites of virtually any complexity.

Enhanced graphics support makes working easier FrontPage 2003 with images from other applications. FrontPage 2003 successfully combines the capabilities of using a visual designer and code editing tools. In this version of the program, a split window (Split mode) has appeared, which consists of two areas - "Design" (Design) and "Code" (Code). The Design window is under development in the mode WYSIWYG, and the Code window automatically updates the code when making changes to the layout.

 

 

 

Fig. 4.17. The program FrontPage 2003 is available dual view, unifying approaches "Designer" and "Code"

 

Integrated design tools can improve the quality of the generated code and improve programming skills.

FrontPage 2003 generates efficient HTML that does not contain the redundancy that is characteristic of the code generated by Microsoft Word. Scripting tools enable interactive communication with visitors.

The smart search and replace function searches for and replaces attributes or tags on specified pages. In this case, you can specify complex search and replace rules, which allows you to quickly perform updates to the Web site. FrontPage provides the ability to optimize HTML code written in other applications by removing redundant tags, spaces, etc.



Поделиться:


Последнее изменение этой страницы: 2020-03-26; просмотров: 96; Нарушение авторского права страницы; Мы поможем в написании вашей работы!

infopedia.su Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав. Обратная связь - 3.139.240.142 (0.026 с.)