Hannah Graves | Summary Six


HTML Tables, Index Postioning, & Float


HTML Table Basics

HTML tables have a basic structure using <table>, <tr>, and <td> elements. Each row in a table starts with <tr> and contains one or more <td> elements for cells, with rows ending with </tr>. Cells are defined by <td> tags, and browsers can automatically add borders. Email links use mailto: in <a> tags, while target="_blank" opens links in new tabs. HTML also allows linking within the same page or to specific parts using IDs and anchor points. Padding in CSS creates space between content and borders, and older browser issues with padding can be fixed with correct DOCTYPE declarations.


Index Positioning

When using relative, fixed, or absolute positioning in CSS, developers have full control over how elements appear on a webpage. The order of appearance in the HTML code determines which element sits on top; elements appearing later in the code will be on top of earlier ones. The z-index property manages the stacking order, where a higher value brings an aspect closer to the front. For example, an element with a z-index of 10 will appear over another with a z-index of 5.


CSS Float

The float property in CSS is commonly used to position elements side by side within a containing element. This property allows an element to be floated to the left or right, with other elements flowing around it. When using float, it's essential to specify the width of the floated element to control its layout. Floats can affect the positioning of subsequent elements, and the clear property is often used to prevent elements from touching the sides of a floated box within the same containing element.