Cell Padding-spacing

Duration: 4 min

This video lesson is available to enrolled students.

Enroll to watch — RSSB (Basic Computer Instructor)

AI summary & chapters

AI Summary

An AI-generated summary of this video lecture.

This lecture introduces HTML table attributes for controlling internal and external spacing. The instructor defines cell padding as the space between a table cell's content and its border, presenting the syntax <table cellpadding="value"> where value specifies pixels. A code example with border="1" and cellpadding="10" is annotated to show how padding increases the gap inside cells. The lesson then transitions to cell spacing, defined as the space between adjacent table cells that creates gaps between their borders. The syntax <table cellspacing="10"> is demonstrated with a simple two-column table, using red arrows to highlight the gaps between cells. Finally, a combined Student Report Card example applies cellspacing="15" and cellpadding="12", visually mapping each attribute to its rendered effect: spacing outside cells and padding inside cells.

Chapters

  1. 0:00 2:00 00:00-02:00

    The instructor defines cell padding as the space between a table cell's content and its border, displaying the syntax <table cellpadding="value">. A code example with border="1" and cellpadding="10" is shown alongside a rendered table. Red annotations underline key terms like 'space' and 'border', while arrows point from the cellpadding attribute to the padding area around the 'Name' cell content, visually demonstrating how the value increases internal spacing in pixels.

  2. 2:00 4:15 02:00-04:15

    The lesson shifts to cell spacing, defined as the space between adjacent table cells creating gaps between borders. The syntax <table cellspacing="10"> is presented with a simple table example, where red boxes highlight the gaps between cells. The segment concludes with a combined Student Report Card example using cellspacing="15" and cellpadding="12". Red arrows map the cellspacing attribute to gaps between cells and the cellpadding attribute to space inside cells, clearly distinguishing external spacing from internal padding in the rendered output.

The lecture progresses logically from defining cell padding to cell spacing, then combining both concepts. Key teaching methods include visual annotations (red arrows, underlines, boxes) that directly connect HTML attributes to their rendered effects. The central distinction is spatial: padding controls space inside a cell (between content and border), while spacing controls space between cells (gaps between borders). The final Student Report Card example reinforces this by applying both attributes simultaneously, allowing students to see how cellspacing="15" creates external gaps and cellpadding="12" adds internal breathing room. This visual mapping approach helps students understand that these are independent attributes affecting different parts of the table structure.

Loading lesson…