×
=0) { let js = text.slice(pos1, pos2); + '<\/' + "script" + '>'; arrText.push(js); // next pos1 = pos2; continue; } } } break; } return arrText; } function OpenDialog(parentDiv, urlContent) { parentDiv = document.getElementById('modal-background'); // new !!!!!!! parentDiv.appendChild(document.getElementById('modal-template')); document.getElementById('modal-background').style.display = "block"; document.getElementById('modal-template').style.display = "flex"; // !!!!! document.getElementById('modal-body').innerHTML = ""; post_url(urlContent, "", function(text_from_server) { var element = document.getElementById('modal-body'); element.innerHTML = text_from_server; // add scripts var arrJSText = get_scripts(text_from_server); for (var i=0; i
dir.by
Search
Programming, development, testing
→
Html & CSS
→
Correct layout HTML. Bad to use table. You need to use div
Looked at
5174
times
Correct layout HTML Pages
last updated: 15 November 2018
Tabular layout
Tabular layout - the page contains <table>
Block layout
Block layout - the page contains <div>
Note!
Bad to use (tabular message) <table>
Need to use (block message) <div>
Block layout is better indexed by search engines
The essence of block layout
In the graphic editor, a layout of the site is created: it is marked where which area of the page (header, bottom, sidebar, main content) will be located and how much space to occupy, pictures and backgrounds are prepared.
Each part of the page is placed in its own block <div>
the first block contains the top of the site
the second block contains a menu
the third block contains content
and so on.
Each block is filled with contents HTML, as well as positioned and formatted using markup CSS.
HTML a page is a set of blocks <div> with content inside. The design is often in a separate file CSS.
Principles of block layout
The content needs to be separated from the design.
HTML — separate file
CSS — separate file
This approach makes the structure clearer. The programmer does not need to open the file CSS.
The designer does not need to open the file HTML.
Everyone writes their own code and does not interfere with each other.
← Previous topic
How to make your website fit in size on your phone, tablet? (HTML meta with attribute name='viewport')
Next topic →
Что такое Adaptive design (адаптивный дизайн)? Что такое Responsive design (отзывчивый дизайн) ?
Your feedback ... Comments ...
Your Name
Your comment
(www links can only be added by a logged-in user)
+ Picture
Объявления
Объявления
HTML elements
•
HTML tag <a> link to go to another page
•
HTML tag <abbr> shows an abbreviated name, if you let the mouse down there will be a pop-up inscription
•
HTML tags fieldset and legend. This is a frame with a title
•
HTML tag <!-- --> comment
•
style="border" in the HTML
HTML поиск элемента, элементов
•
document.querySelector(...) это JavaScript метод для поиска элемента из document (то есть во всем HTML)
•
yourElement.querySelectorAll(...) это JavaScript метод для поиска элементов внутри другого HTML элемента
HTML svg (vector graphics for drawing lines, rectangles, ellipses, ...)
•
<svg> vector graphics, drawing a line<line>, rectangle <rect>, circle<circle>, text<text>
HTML canvas (drawing pictures, text, shapes)
•
HTML <canvas> drawing a rectangle
•
HTML <canvas> рисуем линии по нажатию мышкой на Canvas
•
HTML <canvas> we draw pictures
•
HTML <canvas> we draw a picture with a rotation
•
HTML <canvas> draw a picture with horizontal reflection
•
HTML <canvas> we draw a picture and text
•
HTML <canvas> draw a picture many times in a rectangle (template)
•
HTML <canvas> how to get mouse coordinates ? Determine the position of the mouse.
•
HTML <canvas> drawing a snake with lines moveTo, lineTo
CSS
•
CSS description
•
After modifying the file css , the browser displays old styles over and over again. Why?
•
Books to study CSS
CSS flex (элемент может растягиваться или сжиматься и таким образом заполнять свободное пространство)
•
Что такое CSS flex
Freeze
•
Шапка в таблице всегда видна при скролинге | freeze header in table | HTML
•
Div всегда виден при скролинге (position:fixed, position:sticky) | freeze div | HTML
Do Popup using HTML and Javascript
•
How to make a Popup window in a HTML page | Javascript, HTML, CSS
Motion and animation of pictures
•
Анимация человечка на месте. Используем HTML элемент <div>. Для анимации используем CSS стили: "animation", "background-image", "background-position", "keyframes"
•
Анимация человечка в движении (sprite). Используем HTML элементы <div>, <img>. Для анимации используем CSS стили: "animation", "background-image", "background-position", "keyframes"
•
Рисуем картинку с движением. Используем HTML элемент <canvas>. Для движения используем JavaScript: var img = new Image(), img.src = url, drawImage, timer, window.setInterval
•
Drawing a picture with movement and animation (sprite). Используем HTML элемент <canvas>. Для движения используем JavaScript: var img = new Image(), img.src = url, drawImage, timer, window.setInterval
Web страница на телефоне
•
Открываю web страницу на телефоне в Google Chrome. Почему при двойном нажатии размер страницы увеличивается?
Верстка, дизайн страницы
•
What the Front-end development?
•
Как определить устройство (планшет, компьютер, телефон) сейчас используется в JavaScript, HTML
•
Как сделать чтобы ваш сайт работал на телефоне, планшете, компьютере используем css media и max-device-width и min-device-width | HTML | CSS
•
How to make your website fit in size on your phone, tablet? (HTML meta with attribute name='viewport')
•
Correct layout HTML. Bad to use table. You need to use div
•
Что такое Adaptive design (адаптивный дизайн)? Что такое Responsive design (отзывчивый дизайн) ?
•
Меняем цвет scrollbar (полосы прокрутки) для HTML страницы. Используем CSS
WWW sites for learning
•
Sites to explore HTML
Ваши вопросы присылайте по почте:
info@dir.by