More Subjects
IT
[Name of the Writer]
[Name of the Institution]
IT
Absolute Positioning
Absolute positioning is the position property of the Cascading style sheet (CSS) layout. It allows the developer to place the elements anywhere on a page. The position attributes top, left, right and bottom are used to set the location of the element on a page. Absolute property basically allows developers to move elements in a page relative to their current place. However, they are removed from the document flow, so absolute positioned elements are neither affected by other elements on the page nor affect the other elements on a page. However, one thing needs to be considered while using absolute positioning that doesn't overuse the absolute position on a page because inappropriate use of absolute positioning can limit the liability of website. Absolute position in HTML page positions the HTML element to its nearest positioned parent. By default, absolute position elements arranged above other elements whose position is not (Bos et al., 2005).
Difference between embedded and external style sheets
External CSS is used to define all the CSS style attributes in one file for a web page. You can simply define the style attribute for HTML tag in the external sheet, but you must remember that style tag is not used in external CSS. While in embedded style sheet <style> tag is used inside <head> tag in Html page for styling. The embedded style sheet is similar to the inline sheet but different from external sheets because embedded styling is also defined inside an HTML document as compared to external CSS which is defined externally in another document. The advantage of embedded CSS is that only a single page is affected by the stylesheet, but it increases the loading time of page that’s why external sheets are preferred because they provide faster loading speed (York, 2004). Below is the difference of syntax between both embedded and external CSS.
External CSS: h1 { color: red; padding: 10px; font-size: 20px; margin: 10px; font family: 10px}
Embedded CSS: <head><style> The attributes you want to use </style></head>
References
Bos, B., Çelik, T., Hickson, I., & Lie, H. W. (2005). Cascading style sheets level 2 revision 1 (css 2.1) specification. W3C working draft, W3C, June.
York, R. (2004). Beginning Css Cascading Style Sheets For Web Desg. John Wiley & Sons.
More Subjects
Join our mailing list
© All Rights Reserved 2023