Answer:
<p> or <div> do not have styling features inherently.Answer:
Inline CSS:
style attribute.<p style="color:red;">Hello</p>.Internal CSS:
<style> tag within the <head> section of the HTML document.<style>
h1 {
color: green;
}
</style>
External CSS:
.css file, which is linked to the HTML document via a <link> tag.<link rel="stylesheet" href="style.css" />
Answer:
background-color: yellow; in CSS changes the whole page background.body { font-family: Arial; } applies to the entire site.Answer:
style attribute.<style> tag in the HTML documentās <head>..css files.Answer:
Answer:
Answer:
color: green; and inline CSS says color: red;. What color will the paragraph display and why?Answer:
style="color:red;" overrides it due to being more specific and closer to the element.Answer:
Disadvantages:
Mitigation of browser compatibility issues:
-webkit-, -moz-) for properties that require them to work on specific browsers.By following these practices, developers ensure consistent style rendering across browsers.
Answer:
@media (max-width: 600px) {
body {
background-color: lightgrey;
font-size: 14px;
}
}