Тег STRONG

— элемент выделения важного текста

Элемент сильной значимости ( ) указывает на то, что его содержание имеет большое значение, серьёзность или срочность. Браузеры обычно отображают содержимое жирным шрифтом.

Категории контента Потоковой контент, Фразовый контент, явный контент.
Допустимый контент Фразовый контент.
Опускание тегов Нет, должен иметь как начальный тег, так и конечный тег.
Допустимые родители Любой элемент, который принимает фразовый контент, или любой другой элемент, который принимает потоковой контент.
Допустимые ARIA-роли Любые
DOM-интерфейс HTMLElement

Атрибуты

Этот элемент включает в себя глобальные атрибуты.

Замечания по использованию

Элемент предназначен для контента, который имеет «большое значение», включая вещи большой серьёзности или срочности (например, предупреждения). Это может быть предложение, которое имеет большое значение для всей страницы, или вы можете просто попытаться указать, что некоторые слова имеют большее значение по сравнению с соседним контентом.

Обычно этот элемент отображается по умолчанию с использованием жирного шрифта. Однако, он не должен быть использован просто для применения жирного стиля; используйте свойство CSS font-weight для этой цели. Используйте элемент , чтобы привлечь внимание к определённому тексту без указания более высокого уровня важности. Используйте элемент element для выделения текста, который имеет выраженный акцент.

Читайте также:  Отправка post запросов html

Другим приемлемым использованием для является обозначение ярлыков абзацев, которые представляют заметки или предупреждения в тексте страницы.

против

Не совсем. Элемент для контента, который имеет большее значение, в то время как элемент используется для привлечения внимания к тексту, не указывая на то, что это более важно.

Это может помочь понять, что оба являются правильным и семантическими элементами в HTML5, и это совпадение, что оба они имеют одинаковый стиль (полужирный) в большинстве браузеров (хотя некоторые старые браузеры фактически подчёркивают ). Каждый элемент предназначен для использования в определённых типах сценариев, и если вы хотите жирный шрифт просто для украшения, вместо этого вы должные использовать свойства CSS font-weight .

Предполагаемое значение или цель прилагаемого текста должно быть тем, что определяет, какой элемент вы используете. Значение общения — вот что такое семантика.

против

Добавление к путанице заключается в том, что, хотя HTML 4 определяет как просто указывающий на более сильный акцент, HTML 5 определяет как представляющий «большое значение для его содержимого». Это важное различие.

В то время, как используется для изменения значения предложения, поскольку делается устный акцент («Я люблю морковь» против «Я люблюморковь«), используется, для придания предложению порции особого значения (например, «Предупреждение! Это очень опасно.«) Оба элемента и могут быть вложены для увеличения относительной степени важности или усиленного акцента, соответственно.

Примеры

Основной пример

p>Прежде чем продолжить, strong>убедитесь, что вы надели защитные очкиstrong>.p> 

Источник

Tag in HTML

Javascript Course - Mastering the Fundamentals

The strong tag in HTML plays an important role in creating effective, readable, and attractive web pages. The strong tag in HTML indicates that the text or elements inside it have strong importance , seriousness , or urgency . The strong tag in HTML is a phrase tag , and browsers typically render the contents of the bold tag in HTML in bold type.

Syntax

The syntax of the strong tag in HTML is very simple. We need to open the strong tag, provide the content to be emphasized, and then close the strong tag.

The content in between the strong tag in HTML gets a strong emphasis.

Refer to the below-mentioned article to learn more about different HTML tags.

Attributes

The strong tag in HTML supports all the Global Attributes like accesskey , class , content editable , contextmenu , data — * , dir , draggable , dropzone , hidden , id , lang , spellcheck , style , tabindex , title , translate .

Apart from the above-mentioned global attributes, the strong tag in HTML also supports the Event Attributes in HTML like onafterprint , onbeforeprint , onbeforeunload , onerror , onhashchange , onload , onmessage , onoffline , ononline , onpagehid , onpageshow , onpopstate , onresize , onstorage , onunload etc.

Note: There are no attributes that are specific to the tag. It only supports the Global Attributes and the Event Attributes.

How to use tag in HTML?

The strong tag in HTML indicates that the text or elements inside it have strong importance , seriousness , or urgency . The strong tag in HTML is used to give the text a strong emphasis. The elements present inside the strong tag are referred to as strong elements.

Whenever we use the strong tag in HTML, the browser usually displays the strong tag element with the following default CSS values :

The strong tag in HTML is found inside the body tag in HTML. We generally use the strong tag in HTML to separate the content inside the strong tag from the rest of the content by bolding the content of the strong tag in HTML. We can also use the CSS or Cascading Style Sheets to change the behavior of the text.

  • We can also use the tag in HTML to bold the content but the tag will only make the content bold without making the content important.
  • We can also use the tag in HTML, but the tag will only emphasize the text but not make the content bold.

Tag Vs Tag with Example

The tag in HTML is used to bold the content. The tag will only make the content bold without making the content important. On the other hand, the tag is used to emphasize the text. The elements present inside the strong tag are referred to as strong elements.

The default CSS for the tag in html is :

The default CSS for the tag in html is also the same as the tag in html :

Let us take the example of the tag and the tag to better understand the context.

Example of tag

example of b-tag

Example of tag:

example of strong-tag

< em >Tag Vs < strong >Tag with Example

In the previous section, we have seen the use case and example of a strong tag in HTML. The strong tag is used to give the text a strong emphasis. The elements present inside the strong tag are referred to as strong elements.

On the other hand, the tag in HTML is used to emphasize the text. The elements present inside the em tag are displayed in italic .

The default CSS for the tag in html is :

Let us take the example of the tag and tag to understand the context better.

Example or tag

Example of em-tag

Example of tag

another Example of a strong tag

Examples

Let us take some examples of strong tags in HTML to understand the working of strong tags better.

Simple Usage

Simple Example of strong tag

Labeling Warning

Labeling warning

Browser Support

The following browsers support the strong tag in HTML:

  • Chrome
  • Android
  • Safari
  • Safari Mobile
  • Edge (formerly known as Internet Explorer)
  • Edge Mobile
  • Opera
  • Opera Mobile
  • Firefox
  • Firefox Mobile

Conclusion

  • The strong tag in HTML plays an important role in creating effective, readable, and attractive web pages. The strong tag in HTML is a phrase tag, and browsers typically render the contents of the bold tag in HTML in bold type.
  • The strong tag in HTML indicates that the text or elements inside it have strong importance , seriousness , or urgency .
  • The syntax of the strong tag in html is very simple : . content. .
  • There are no attributes that are specific to the tag. It only supports the Global Attributes and the Event Attributes.
  • We can also use the tag in HTML to bold the content but the tag will only make the content bold without making the content important.
  • We can also use the tag in HTML, but the tag will only emphasize the text but not make the content bold.

Learn more about the related tags in HTML :

Want to learn more about the tags mentioned above and more? Refer to the article: HTML Tags — Scaler Topics

Источник

HTML Tag

The tag is used to define text with strong importance. The content inside is typically displayed in bold.

Browser Support

Global Attributes

The tag also supports the Global Attributes in HTML.

Event Attributes

The tag also supports the Event Attributes in HTML.

Default CSS Settings

Most browsers will display the element with the following default values:

Example

Unlock Full Access 50% off

COLOR PICKER

colorpicker

Join our Bootcamp!

Report Error

If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail:

Thank You For Helping Us!

Your message has been sent to W3Schools.

Top Tutorials
Top References
Top Examples
Get Certified

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Источник

Css strong что это

Тег предназначен для акцентирования текста. Браузеры отображают такой текст жирным начертанием.

Синтаксис

Закрывающий тег

Атрибуты

Аналог CSS

      

Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

Результат данного примера показан на рис. 1.

Рис. 1

Рис. 1. Вид акцентированного текста в тексте

Примечание

Следует отметить, что теги и , также как и , несмотря на сходный результат, не совсем эквивалентны и заменяемы. Первый тег — относится к тегам физической разметки и устанавливает жирный текст, а тег — является тегом логической разметки и определяет важность помеченного текста. Такое разделение тегов на логическое и физическое форматирование изначально предназначалось, чтобы сделать HTML универсальным, в том числе не зависящим от устройства вывода информации. Теоретически, если воспользоваться, например, речевым браузером, то текст, оформленный с помощью тегов и , будет отмечен по-разному. Однако получилось так, что в популярных браузерах результат использования этих тегов равнозначен.

Статьи по теме

Источник

Оцените статью