ComputersProgramming

What is "layout of div" when creating a site, its pros and cons

Today the Internet is a part of our life. Its ordinary users hardly think about what path of becoming their favorite site before it appeared in the search engines of the World Wide Web. The birth of the site begins with the idea of a designer - an artist and a person engaged in creating the main layout. After the drawing of the layout is completed, an equally important process begins - the layout of the site template.

A template or a layout is not yet a ready site, it is some model created by the designer, on the basis of which in the future a full-fledged website can be created. From a programming perspective, a template is a set of specific rules for displaying information. To create the simplest static site, the HTML template is usually used . HTML is the standard language for hypertext markup (documents) on the Internet.

Layout of the site layout is the process of forming its web pages according to the template made by the designer. This type of activity is handled by the website designer. The main task of the layout is to create HTML-code that allows you to place text, images and other elements of the web page in certain places in the document and display them in the window of any modern Internet browser according to the model developed by the designer. During his work, the layout designer must constantly ensure that the part of the layout that he has copied is equally correctly displayed in all browsers. A few years earlier the HTML-layout of the site was based on the use of tables. With time, new elements (tags) appear in the HTML language. One such element was the div. If during the last years the layout of the div was the most preferable when creating the pages of the site, today it is mandatory. At present, with the help of tables, the sites are practically unregistered. Instead of the notion of "layout div", the most commonly used term is "layout by layers" or "layout by blocks".

Div Is a tag that can be used to extract a separate fragment of the HTML code of the page. This tag is a block element.

The div tag has two main parameters:

  • Align, which allows to align its contents (on the left, the right edge of the page, the center or the width);
  • Title, which adds a tooltip to its contents.

Layout div: main pluses:

  • Small code of markup in comparison with the table layout;
  • The possibility of creating a "rubber" page design;
  • Fast in the subsequent loading of pages in the user's browser;
  • Easier to work with styles (CSS), style assignment to elements using id.

Layout div: main disadvantages:

  • The inability to correctly display the page in some obsolete browsers (IE6);
  • The complexity of placing blocks and managing them.

Depending on the project, a combination of block and table layout is allowed.

Why are most professionals currently moving away from using layout tables?

In the case of using table layout of the site, its code turns out to be huge, which makes it difficult for further work on it by programmers. In order to find the error made in this HTML-code, a relatively large amount of time will be required. Tabular layout creates an additional load on the web server, thereby slowing down its work, and thus slowing down the process of issuing information by the browser. As a result, the page for a long time is loaded.

Website layout is an important stage of its creation, without it, not one, even the simplest, Internet resource. After the work of the layout is completed, the mock-up layout is sent to the web programmers, providing its integration into the hosting and implementation in the CMS-system, on which it will be during its existence.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.