This series of quizzes covers essential topics in web development, including:
html tag. For HTML5, the doctype is simply: !DOCTYPE html.
ul) and list items (li). The menu items can be styled using CSS to create a desired visual appearance.
form, input, select, textarea, etc.). Each form element has attributes that define its behavior and appearance, and can be styled with CSS.
head tag contains metadata about the document, including the document title, character encoding, CSS stylesheets, JavaScript code, and other information that is used by the web browser to interpret and display the content of the document.
header tag is used to hold introductory information about the material that will be shown, such as a logo, navigation links, or other site-wide content. The h1 tag is a typography heading that represents the top-level heading of the page or section.
alt attribute provides an alternative text description for an image. It is used by screen readers and other assistive technologies for accessibility purposes, and it also serves as a fallback text in case the image fails to load.
article, aside, figcaption, footer, header, main, mark, nav, and section.
table element, along with tr (table row), th (table header), and td (table data) elements. The structure of the table is defined by nesting tr, th, and td elements within the table element.
iframe is an inline frame element that allows you to embed another HTML document within the current HTML document. It can be used for embedding content from external sources, such as maps, videos, or other web pages, without requiring the user to navigate away from the current page. However, iframe usage should be limited as it can cause accessibility and performance issues.
style attribute on an HTML element.
* Internal styles - using a style tag in the head section of the HTML document.
* External styles - using a separate CSS file and linking to it from the HTML document using the link tag in the head section of the HTML document.
link tag in the head section of the HTML document.
background-color property in CSS. For example: body { background-color: #f0f0f0; }
outline property to none in CSS. For example: a img { outline: none; }
px, pt, em, etc.) in CSS depends on the specific use case and design requirements. Generally, px is a good choice for fixed sizes, such as border widths, while em or rem is better for scalable sizes, such as font sizes. pt is less commonly used in web development and is typically used for print design.
.) prefix in the CSS, while IDs use a hash (#) prefix.
margin-left and margin-right properties to auto, and specify a width. For example: .centered { margin-left: auto; margin-right: auto; width: 50%; }
:hover pseudo-class targets an element when the user hovers over it, and the :checked pseudo-class targets a checkbox or radio button when it is selected.
display: none and visibility: hidden in CSS?display: none completely removes the element from the page layout, causing other elements to fill the space it would have occupied. visibility: hidden hides the element visually, but the space it occupies in the layout remains. In other words, display: none affects the document flow, while visibility: hidden does not.
var is a keyword that declares a variable with function scope, meaning it can be accessed within the function it was declared in. let and const are newer keywords that declare variables with block scope, meaning they can only be accessed within the block they were declared in. The difference between let and const is that let declares a variable that can be reassigned a new value, while const declares a variable that cannot be reassigned after it has been assigned a value.
== is a loose equality operator that compares two values for equality after performing type coercion, meaning it will attempt to convert the values to a common type before comparing them. === is a strict equality operator that compares two values for equality without performing type coercion, meaning it will only return true if the values are of the same type and have the same value.
= operator to separate the function parameters from the function body, and automatically returns the value of the function body without the need for a return statement. Arrow functions are often used to create concise and readable code, especially when used as callbacks or in functional programming.