Hannah Graves | Summary Five


HTML Links & CSS Padding


HTML Links

HTML links, defined by the <a> element, are vital for navigation, using the href attribute to point to destinations. Descriptive link text helps users understand where they're headed. CSS properties like text-indent and text-shadow add style, providing indentation and drop shadow effects to enhance the visual appeal of link text. Absolute URLs start with domain names, while relative URLs streamline internal linking within a website without specifying domains, aiding website organization and development.


Enhancing Navigation

Email links, crafted with the mailto: value in <a> href attributes, open email programs with specified addresses. Using target="_blank" in <a> tags opens links in new browser windows or tabs, which is handy for external links. HTML's ID attribute creates anchor points, allowing linking to specific parts within a page and improving user navigation in lengthy content. Additionally, links can direct users to particular sections on other pages using the # symbol followed by ID values in href attributes, facilitating seamless navigation across related content.


CSS Padding

CSS padding creates space between an element's content and border, enhancing readability and aesthetics. It's specified in pixels or percentages relative to the browser window or box. Padding customization can be done individually for each side or using a shorthand notation. Despite increasing the box's width, child elements don't inherit padding. Resolving older browser quirks regarding padding and box width requires correct DOCTYPE declarations in HTML, ensuring consistent rendering.