Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
* { margin: 0; padding: 0; }
можеть быть лишение всех используемых блочных элементов margin'а и padding'а:body, div, td, ul, ol, li, dl, dt, dd, p, h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; }
User agents that don't support style sheets, or don't support the specific style sheet language used by a STYLE element, must hide the contents of the STYLE element. It is an error to render the content as part of the document's text.
Пользовательские агенты, не поддерживающие CSS, должны скрывать содержимое элемента STYLE. Является ошибкой отображать его содержимое как часть текста документа.
Style sheet data (%StyleSheet; in the DTD) can be the content of the STYLE element and the value of the style attribute. User agents must not evaluate style data as HTML markup.
Информация в листах стилей (обазначаемая в DTD как %StyleSheet;) может быть содержимым элемента STYLE и значением атрибута style. Пользовательские агенты не должны рассматривать эту информацию как разметку HTML.
Although the STYLE and SCRIPT elements use CDATA for their data model, for these elements, CDATA must be handled differently by user agents. Markup and entities must be treated as raw text and passed to the application as is.
Так же CDATA используют в своей модели данных STYLE и SCRIPT. Для этих элементов CDATA должен интерпретироваться иначе. Разметка и сущности должны рассматриваться как простой текст и передаваться приложению как есть.
Is it good when modern web browsers sometimes displays content of STYLE element as part of the document's text?
For example:
http://pavelgorlov.ru/ff3-bug.html
Hello Maksim,
> Is it good when modern web browsers sometimes displays content of
> STYLE element as part of the document's text?
Yes, if you tell them so... :-)
Your style rule says that *all* elements are to be displayed as blocks.
The element is also an element, and thus it is displayed as a block.
Your rule overrides the default rule for HTML:
head {display: none}
This example illustrates for CSS how to comment out the content of STYLE elements to ensure that older, non-conforming user agents will not render them as text.
<STYLE type="text/css">
<!--
H1 { color: red }
P { color: blue}
-->
</STYLE>
* {display: block}
то и должно происходить ко всем элементам.* html или _height:
- а что, ну ошибся человек, ну так пусть браузер догадается!html
в css?<head>
?br {display: none}
- глупость?input["hidden"]
- тоже сталкивался с таким, поначалу дико было, а ведь с другой стороны - это всё такое... у нас есть элемент, есть его первоначальные стили отображения, а мы для своих задач можем (к счастью) писать что нам нужно.
Разница между разметкой и представлением