To embed a calendar on a webpage, use an iframe with the embed code from your calendar provider (such as Google Calendar). Here's a basic example for embedding a Google Calendar:
<iframe src="https://calendar.google.com/calendar/embed?src=your_calendar_id&ctz=America%2FNew_York" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
Steps:
Go to your calendar (e.g., Google Calendar).
Click on the calendar settings and find the "Integrate calendar" or "Embed code" section.
Copy the provided iframe code.
Replace
"your_calendar_id"
with your actual calendar ID (usually your email or a unique identifier).Adjust the
width
,height
,style
, and timezone (ctz
) as needed.
This will display the calendar directly on your webpage, letting users view events without leaving the site.