Learn about Internal Styles in CSS

For general web development questions using HTML and CSS.
Post Reply
Site Admin
Posts: 44

Learn about Internal Styles in CSS

Post by admin » Tue May 19, 2020 2:07 am

CSS enclosed in <style></style> tags within an HTML document functions like an external stylesheet, except that
it lives in the HTML document it styles instead of in a separate file, and therefore can only be applied to the
document in which it lives. Note that this element must be inside the <head> element for HTML validation (though it
will work in all current browsers if placed in body).

Code: Select all

 h1 {
 color: green;
 text-decoration: underline;
 p {
 font-size: 25px;
 font-family: 'Trebuchet MS', sans-serif;
 <h1>Hello world!</h1>
 <p>I ♥ CSS</p>
Learn what is External Stylesheet in CSS
URL - viewtopic.php?f=7&t=449

Post Reply