What is an HTML element composed of?
An HTML element has an opening tag, content, and a closing tag. Example: <p>Hello World!</p>
What is semantic HTML?
Semantic HTML adds meaning to the page using elements like main, section, and article which can hold content such as blogs and comments. Article is placed inside section.
What is the aside element used for?
The aside element is used to mark additional info that can enhance another element, such as bibliographies, endnotes, comments, pull quotes, and sidebars.
What does a CSS rule consist of?
A CSS rule consists of a selector (which element to target), a declaration block containing property-value pairs. Example: h1 { color: blue; }
What is an attribute selector in CSS?
An attribute selector targets elements with an href attribute value of a specific class. Example: [href] { color: magenta; } or a[href*=’florence’] { color: lightgreen; }
What are pseudo-classes in CSS?
Pseudo-classes are selectors like :focus, :visited, :disabled, and :active that select only specific elements with a class of special or based on their state.
What is a descendant combinator?
A descendant combinator (.main-list li) selects the element <li> with the .main-list class using a space between selectors.
What are web safe fonts?
Web safe fonts are fonts that are widely available across different systems and browsers, ensuring consistent display.
What CSS properties control text alignment and justify?
text-align with values: left, center, right, justify
What is the opacity property in CSS?
Opacity determines how transparent an element is, with values from 1 (fully visible) to 0 (transparent).
What is the CSS Box Model?
The Box Model consists of margin (outermost), border, padding, and content (innermost). Height and width define the content area.
What does border: 3px solid coral; do?
It creates a border that is 3 pixels wide, with a solid style, in coral color (width, style, color format).
What is the difference between width and margin: 0 auto?
width (e.g., 400px) sets the element width. margin: 0 auto centers the divs in their containing elements.
What are min-width and max-width?
min-width and max-width set limits on how wide an element can become, helping with responsive design.
What does the overflow property control?
Overflow controls what happens to content that spills outside its box, with values: hidden, scroll, or visible.
What does the visibility property do?
Visibility hides elements (hidden, visible, collapse). With ‘none’, the element is completely removed and space will be invisible.
What is box-sizing: border-box?
In border-box model, the height and width of the box will remain fixed. Border and padding will be included inside the box (content, padding, border). Dimensions of elements remain the same regardless of border and padding.
What are block-level elements?
Block-level elements take the full width of their parent elements and prevent other elements from appearing in the same horizontal space. Examples: <h1>, <p>, <div>, <footer>
What is the position: relative property?
Position relative allows positioning with top/bottom/left/right values. All other elements on the page will ignore the element and act like it’s not present.
What is position: absolute?
Position absolute positions all other elements on the page as if the element doesn’t exist. The element will be positioned relative to its closest ancestor with position property set to anything other than static. Element will scroll.
What is position: fixed?
Position fixed fixes an element to a specific position on the page (regardless of scrolling) and accompanies it with the offset properties of top, bottom, left, right.
What is position: sticky?
Sticky keeps the element in the document flow as the user scrolls, but sticks to a specified position as the page is scrolled further.
What is z-index?
z-index controls the layering of elements, with higher values appearing on top. It works with display: inline, block, inline-block.
What is the default display of <em>, <strong>, and <a> elements?</a></strong></em>
The default display is inline - they only take the amount of space necessary to display their content and can appear next to each other. We can specify their dimensions using width and height with inline-block.
,