Python Tkinter Label (original) (raw)

Last Updated : 23 Feb, 2026

Tkinter Label widget is used to display text or images inside a Tkinter window. It is commonly used to show titles, captions or information in GUI applications.

**Example: In this example, a simple window is created and display a basic text label.

Python `

import tkinter as tk

root = tk.Tk() lbl = tk.Label(root, text="Hello World") lbl.pack()

root.mainloop()

`

**Output

Screenshot-2026-02-17-113035

Tkinter window displaying a simple "Hello World" label.

**Explanation:

Label(master, options)

**Parameters:

Tkinter Label Options

Some commonly used options of the Label widget are:

Example

In this example, a Tkinter window is created and display a styled label with custom font, colors, size and border. This shows how labels are used in real GUI applications.

Python `

import tkinter as tk

root = tk.Tk() root.geometry("400x200") root.title("Label Example")

lbl = tk.Label(root, text="Welcome to Tkinter", font=("Arial", 16, "bold"), bg="lightblue", fg="darkblue", width=20, height=2, relief="raised")

lbl.pack(pady=30) root.mainloop()

`

**Output

Screenshot-2026-02-17-113624

Tkinter window showing a styled label with custom font, colors and border.

**Explanation: