Advanced Text Styling with Gradio
Learn how to format text as code, and highlight text in Gradio.
Further text formatting
In this lesson, we are going to look into other ways we can display and format the text in Gradio, using the Code
and HighlightedText
components.
Text highlighting
Sometimes, we want to emphasize certain words or characters in a block of text to draw the attention of the user to these parts of the text. For example, if we were looking at the listing description, we may be interested in highlighting certain keywords that are of interest, such as proximity to schools, parks, newly renovated, etc. This is exactly what the HighlightedText
component in Gradio allows us to do.
Get hands-on with 1300+ tech skills courses.