На одном языке: 21 термин из HTML-верстки, чтобы лучше понимать разработчиков
Преподаватель программы обучения «HTML-верстка», технический директор digital-агентства PLUS8 Дмитрий Демидовский составил для «Нетологии» словарь из 21 термина. С их помощью вы сможете лучше понимать разработчиков.
Верстка, front-end
Означают практически одно и то же: код, работающий в браузере. Для сравнения: в отличие от front-end, back- end исполняется на сервере.
HTML-разметка
Контент сайта (тексты, изображения, видео, аудио), сгруппированный по смыслу в иерархические блоки, обозначенные тегами.
HTML-тег
Главное и единственное средство разметки контента. Обозначается треугольными скобками.
Некоторые теги имеют начало и конец: … Некоторые могут быть сами по себе.
HTML-элемент
«Кирпичик» сайта, его структурная единица. То, что образовано тегом.
Атрибут
Дополнительный параметр тега, который определяет его вид или поведение.
Тег может иметь много атрибутов.
Стили, CSS
Cascading Style Sheets — каскадные таблицы стилей. Набор правил для оформления элементов.
CSS-свойство
Параметр элемента, отвечающий за какой-либо один аспект его отображения. Например, размер или цвет.
CSS-правило
Определяет применение свойств к элементу или группе элементов. Правило может включать много свойств.
Скрипты, JavaScript, JS
Скрипты — «народное название» JavaScript. JS — сокращение от JavaScript.
Код, отвечающий за взаимодействие с пользователем и за динамические элементы на сайте — слайдеры, меню, некоторые формы.
Иногда его путают с Java. Это неправильно — это два разных языка с разными задачами.
jQuery
Библиотека, написанная на JS. Очень популярна, практически выступает стандартом на множестве сайтов.
Метатеги, метаданные
Cпециальные теги, которые не отображаются непосредственно на веб-странице, но хранят дополнительную информацию о документе: его кодировка, ключевые слова, данные для поисковых роботов и социальных сетей.
Медиазапросы, mediaqueries
Cпособ применять различные CSS-правила в зависимости от используемого устройства.
@media screen and (max-width: 480px)
Фиксированная верстка (фикс)
Фиксированная верстка имеет постоянную ширину, обычно около 1000 пикселей. На больших экранах центрируется, на маленьких обрезается.
Пример фиксированной верстки — социальная сеть «ВКонтакте».
Резиновая верстка (резина)
Резиновая верстка подстраивается под экран в определенных заданных пределах. Например, от 1024 до 1920 пикселей.
Адаптивная верстка (адаптив)
Верстка, которая подстраивается под любой экран. Блоки могут перемещаться, скрываться и показываться, а также менять свое поведение.
Примеры фиксированной, резиновой и адаптивной верстки
Фреймворк
Набор компонентов, с помощью которых можно применять готовые решения для типовых задач (адаптивные элементы, способы навигации, элементы форм), а не писать их с нуля.
Кроссбраузерность
Способность сайта одинаково отображаться как в современных, так и в старых браузерах.
Валидность
Соответствие верстки официальным утвержденным стандартам.
Кэш браузера
Подход, позволяющий ускорить загрузку и отрисовку верстки. Реализуется не верстальщиком, а разработчиками браузеров.
Канвас, canvas
НTML5-технология, заменившая Flash в плане отображения графики в браузере. Использует аппаратное ускорение, программируется на JavaScript, позволяет делать сложную графику, в том числе трехмерную.
Препроцессоры и постпроцессоры
Дополнительные инструменты для обработки кода. Существуют и для HTML, и для CSS, и для JS. Призваны ускорить и упростить работу верстальщика за счет автоматизации и дополнительных возможностей, которых нет в языках изначально.
Препроцессоры: для HTML — HAML, для CSS — Sass, для JS — CoffeeScript.
Постпроцессоры: для CSS — Autoprefixer, для JS — YUI Compressor.
While getting started with HTML, you will likely encounter new—and often strange—terms. Over time you will become more and more familiar with all of them, but the three common HTML terms you should begin with are elements, tags, and attributes.
Elements
Elements are designators that define the structure and content of objects within a page. Some of the more frequently used elements include multiple levels of headings (identified as through elements) and paragraphs (identified as the
element); the list goes on to include the , , , , and elements, and many more.
Elements are identified by the use of less-than and greater-than angle brackets, < >, surrounding the element name. Thus, an element will look like the following:
Tags
The use of less-than and greater-than angle brackets surrounding an element creates what is known as a tag. Tags most commonly occur in pairs of opening and closing tags.
An opening tag marks the beginning of an element. It consists of a less-than sign followed by an element’s name, and then ends with a greater-than sign; for example, .
A closing tag marks the end of an element. It consists of a less-than sign followed by a forward slash and the element’s name, and then ends with a greater-than sign; for example,
.
The content that falls between the opening and closing tags is the content of that element. An anchor link, for example, will have an opening tag of and a closing tag of . What falls between these two tags will be the content of the anchor link.
So, anchor tags will look a bit like this:
Attributes
Attributes are properties used to provide additional information about an element. The most common attributes include the id attribute, which identifies an element; the class attribute, which classifies an element; the src attribute, which specifies a source for embeddable content; and the href attribute, which provides a hyperlink reference to a linked resource.
Attributes are defined within the opening tag, after an element’s name. Generally attributes include a name and a value. The format for these attributes consists of the attribute name followed by an equals sign and then a quoted attribute value. For example, an element including an href attribute would look like the following:
href="http://htmlpage.com/">Shay Howe
preceding code will display the text “htmlpage” on the web page and will take users to http:// htmlpage.com/ upon clicking the “html page ” text. The anchor element is declared with the opening and closing tags encompassing the text, and the hyperlink reference attribute and value are declared with href=»http://htmlpage.com» in the opening tag.
Self-Closing Elements
In the previous example, the element had only one tag and didn’t include a closing tag. Fear not, this was intentional. Not all elements consist of opening and closing tags. Some elements simply receive their content or behavior from attributes within a single tag. The element is one of these elements. The content of the previous element is assigned with the use of the charset attribute and value. Other common selfclosing elements include
As with anything of a technical nature, understanding the terminology associated with HTML, CSS, and front-end web development is incredibly helpful.
General Terms
Breakpoint The screen size at which a particular media query becomes active in a responsive design. Browser An application which allows users to fetch and view websites. Behind the scenes, this is achieved by looking up domain names on the DNS system, connecting to a server, downloading requested web content (code files) from the server, and rendering it into a viewable website. DNS The internet’s system for matching a human-readable domain name typed into a browser to the numeric IP Address of a server, where a given website’s files are stored. Domain Name The human-friendly address of a website; the address that is typed into the browser. The browser sends this address to DNS in order to be forwarded to the appropriate server at the IP address associated with the domain name. Fluid Design Web pages and elements of web pages that stretch and squash to fit the available space. Unstyled web pages are fluid by default. Git A popular version control protocol. Allows users to keep track of changes made to code and to return to previous versions if necessary. Github A popular website that offers hosting and management of git repositories. IP The address of a computer or server on the internet. A browser must obtain this address from DNS in order to communicate with a server and download site files to display. Responsive Design Web pages that change their layout or other styles based on the media (screen size, orientation, device type) on which it is displayed. Makes use of media queries in CSS to define how and in what context specific CSS should be used. Semantic Code Refers to HTML code which properly utilizes elements according to their meaning. It is code that describes the content rather than using elements simply based on their appearance. Server A specialized computer that stores website files and content and makes them accessible on the internet. Separation of Concerns This is the concept that a webpage’s content and style should be kept separate in the code. HTML should determine content, and style / presentation should be left to CSS. This methodology was developed to make sites easier to maintain, re-theme, and parse. Syntax The parts of a code language and their proper order to make a valid statement. Just as in English statements are made of words and symbols which must come in a certain order to convey a particular meaning, so too must statements in code languages be properly constructed to achieve a desired effect. Viewport The visible area of a web page in a browser window. Viewport dimensions vary with different device screen sizes, orientation, and window scaling.
HTML Terms
Attribute Additional information that can be added to some HTML elements to provide additional configuration or behavior in the browser. Attributes are written inside the brackets of an element’s tag (or opening tag) and consist of either the attribute name paired with a value or just the attribute name for binary attributes. E.g. , where «src» is the name of the attribute and «file.jpg» is it’s value. Browser An application / software used for viewing and interacting with websites. Browsers use take a given domain name, reach out to DNS to indicate the IP Address of the associated server, then download the code files for the webpage from the server. Then the files are read to render the webpage as described by the code. Finally, the browser continues watching for user interaction and responds as the code instructs. Element A discrete piece of code in HTML that defines specific content, such as text, media, etcetera. An element typically includes an opening tag, and may include attributes, and a closing tag (if it is not a self-closing element). HTML An abbreviation for HyperText Markup Language. It is the most basic language for websites and defines the meaning and structure of content on a web page. Self-Closing Element Any element that does not require a separate closing tag in addition to the opening tag. For example: , which stands alone, as opposed to text , which requires the closing tag after the text. Server A special computer for storing code files and other web content. Browsers must connect to a server and download that content to render a website. Tag The written code associated with an element. Usually consists of the name of the element (or sometime an abbreviation) placed between arrow brackets, e.g.
CSS Terms
CSS A code language for defining the visual and presentational style of a webpage. CSS code looks for matching pieces of HTML and declaring specific rules for their presentation. Declaration / Rule A property / value pair that defines the style for one aspect of the selected element. E.g. padding: 2rem , where padding is the property and 2rem is the value. Declaration Block A chunk of CSS that includes one or more selectors associated with one or more rules (property / value pairs). Property Identifies which feature a CSS declaration will affect. A property is paired with a valid value to declare that a specific style should be used. Together, the property / value pair are called a rule or declaration. Examples of properties might include color , font-size , or margin . Selector Indicates the particular HTML content to be styled by a given CSS declaration block. Can a be a type of element, a class or ID, or various other more complex methods of identifying particular HTML. Stylesheet Another word for the CSS file associated with a web page. Value The specified setting for a given CSS property in a declaration. Each property has its own set of associated valid values. Depending on the property, a value might be numeric ( 400 ), a measurement ( 5px ), a color ( #efefef ), a keyword ( italic ), etcetera.