In this module, you will deepen your CSS skills by building a digital business card for yourself. Using the body CSS selector, you’ll apply unique style properties to the body of the web page. Download our free guide for best practices for getting started with HTML. You’ve changed the background of a div on your web page. A div is a container element that’s commonly used to designate different sections of a webpage. Toggle between the HTML and CSS tabs, edit the code, and click rerun in the bottom right-hand corner.
- I have, and I can attest to how attention-grabbing it can be.
- The course will describe the arrangement of content blocks, images and other related elements.
- When you enroll in the course, you get access to all of the courses in the Specialization, and you earn a certificate when you complete the work.
- You are free to modify, save, share, and use them in all your projects.
This topic contains the following modules, in a suggested order for working through them. Learn to code interactively – without ever leaving your browser. Add this credential to your LinkedIn profile, resume, or CV.
Background color HSL Values
To change the background color of the table, I can use inline CSS to target that single element. You did a great job walking through that example, so now, I’ll show you how to tackle setting the background color of multiple elements on a page. Before the latest version of HTML, you could use the bgcolor attribute to change the background color of a page or element.
The CSS border property defines a border around an HTML element. The CSS font-size property defines the text size to be used. Join our community of 40 million+ learners, upskill with CPD UK accredited courses, explore career development tools and psychometrics – all for free.
How do I remove background color in HTML?
To make the second button 40% see-through, we’ll use the .btn-secondary class selector to apply the opacity property. Finally, you can use HSL values to set your colors in CSS. HSL, which stands for hue, saturation, and lightness, is written with the hsl() function. The syntax is similar to RGB, except you use percentages to indicate the saturation and lightness of the hue you pick. Changing the background color of a div is identical to changing the background color of your web page’s body.
Scrimba is an interactive code-learning platform with over a million users from all over the world. They feature highly interactive and engaging HTML5 and CSS3 Lessons courses about programming and web development. In this module, you will learn the basics of CSS by building a clone of the Google.com homepage.
Writing Your First Code
‘HTML5 and CSS3 Fundamentals’ is a course that aims to provide you with in-depth illustrations on how to build websites using HTML5 from the ground up. It is essential to understand the prerequisites to create a complete website and the step-by-step procedure of using the latest standard of HTML5 and CSS3. Before working with HTML5 and CSS3, you must understand the other kinds of text that you can use for formatting and the different usable list items. We demonstrate how you can use the text editor to set up different types of lists and when you can use the ‘order’ list. Discover how to add styles to the page design using CSS and how to add CSS styles to regulate any HTML5 tag with the use of the style attribute.
Use our color picker to find different RGB, HEX and HSL colors. In select learning programs, you can apply for financial aid or a scholarship if you can’t afford the enrollment fee. If fin aid or scholarship is available for your learning program selection, you’ll find a link to apply on the description page. Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.Portions of this content are ©1998–2024 by individual mozilla.org contributors. The main entry point for CSS documentation on MDN, where you’ll find detailed reference documentation for all features of the CSS language.