PrepAway - Latest Free Exam Questions & Answers

You are developing a web page by using HTML5.

You are developing a web page by using HTML5.

You have the following requirements:

An H1 element must be placed at the top left corner of the page.

The size and location of the H1 element must not change if additional elements are added tothe page.

You need to position the H1 element on the page.

Which CSS3 style should you use?



A. Option A

B. Option B

C. Option C

D. Option D

Explanation:

* The position property specifies the type of positioning method used for an element (static, relative, absolute or fixed).

absolute: The element is positioned relative to its first positioned (not static) ancestor element

* For absolutely positioned elements, the left property sets the left edge of an element to a unit to the left/rightof the left edge of its containing element.

CSS Syntax

left: auto|length|initial|inherit;

length: Sets the left edge position in px, cm, etc.

Reference: CSS position Property; CSS left Property


Leave a Reply