Anonymous
Dash поместите тег в тег .
Сообщение
Anonymous » 02 янв 2026, 14:57
С помощью Dash я знаю, как разместить теги в разделе . Теперь я хочу разместить там теги . Как это сделать?
Код: Выделить всё
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from dash import Dash, html
app = Dash(
__name__,
meta_tags= [
dict(name = 'description', content = 'Description of the site'),
{'http-equiv':'content-language', 'content':'pt-br'},
{'http-equiv':'Link', 'content':""";rel="canonical\""""},
]
)
app.layout = [
html.Header(
html.Link(href='https://example.com',rel='canonical')
),
html.P('Some text')
]
if __name__ == '__main__':
app.run(debug=True)
Вот что я получаю:
Подробнее здесь:
https://stackoverflow.com/questions/798 ... l-head-tag
1767355023
Anonymous
С помощью Dash я знаю, как разместить теги в разделе . Теперь я хочу разместить там теги . Как это сделать? [code]#!/usr/bin/env python # -*- coding: utf-8 -*- from dash import Dash, html app = Dash( __name__, meta_tags= [ dict(name = 'description', content = 'Description of the site'), {'http-equiv':'content-language', 'content':'pt-br'}, {'http-equiv':'Link', 'content':""";rel="canonical\""""}, ] ) app.layout = [ html.Header( html.Link(href='https://example.com',rel='canonical') ), html.P('Some text') ] if __name__ == '__main__': app.run(debug=True) [/code] Вот что я получаю: [img]https://i.sstatic.net/TMM0SEnJ.png[/img] Подробнее здесь: [url]https://stackoverflow.com/questions/79859119/dash-place-a-link-tag-in-the-html-head-tag[/url]