Podcast
Questions and Answers
What does the CSS property 'font-size' specifically control?
What does the CSS property 'font-size' specifically control?
Which attribute is NOT associated with the HTML image tag?
Which attribute is NOT associated with the HTML image tag?
Which of the following properties is used to change the horizontal alignment of text in CSS?
Which of the following properties is used to change the horizontal alignment of text in CSS?
What does the 'background-color' property affect in an HTML element?
What does the 'background-color' property affect in an HTML element?
Signup and view all the answers
Which tag should you use to highlight text with a typical yellow background in HTML?
Which tag should you use to highlight text with a typical yellow background in HTML?
Signup and view all the answers
What role does the 'font-family' property serve in CSS?
What role does the 'font-family' property serve in CSS?
Signup and view all the answers
Which of the following elements cannot style text without using CSS?
Which of the following elements cannot style text without using CSS?
Signup and view all the answers
Which of the following correctly describes the purpose of the border property when used with images?
Which of the following correctly describes the purpose of the border property when used with images?
Signup and view all the answers
Study Notes
HTML and CSS Basics
- The
style
attribute in HTML is essential for adding inline styles like color, font, and size to elements. - The
background-color
property in CSS sets the background color of an HTML element. - The
color
property in CSS defines the text color of an HTML element. - The
font-family
property specifies the type of font to be used for text in an HTML element. - The
font-size
property determines the size of the text in an HTML element. - The
text-align
property establishes the horizontal alignment of text within an HTML element.
HTML Formatting Tags
- HTML allows for text formatting without relying solely on CSS, offering a variety of formatting tags.
- Common formatting tags include those that make text bold (like
<strong>
), italicized (like<em>
), or underlined (like<u>
). - To highlight text, the
<mark>
tag can be utilized, which displays text with a default yellow background.
Image Handling in HTML
- The
<img>
tag is utilized to embed images into a web page. - Key attributes of the
<img>
tag include:-
src
: indicates the image's file path. -
align
: determines image alignment (left or right) relative to surrounding text. -
width
: specifies the image's width. -
height
: indicates the image's height.
-
- The
border
property can be applied to images to create borders, available in styles such as solid or double.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
This quiz covers the fundamental concepts of HTML and CSS, including how to apply inline styles and utilize formatting tags. It also addresses image handling and important CSS properties such as background color and font specifications. Test your basic knowledge of web development with this quiz!