Common HTML elements

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Chúng ta có thể thay đổi loại phần tử HTML bằng thuộc tính gì?

  • show
  • type
  • display (correct)
  • section

Để định dạng khoảng cách từ vùng text đến đường viền ngoài của khung, ta sử dụng thuộc tính nào?

  • border-width
  • padding (correct)
  • margin
  • spacing

Cách thiết lập các mẫu định dạng với các phần tử có id tương ứng là:

  • #idname {thuộc tính: giá trị;} (correct)
  • id[name] {thuộc tính: giá trị;}
  • .idname {thuộc tính: giá trị;}
  • idname {thuộc tính: giá trị;}

Các thẻ (hay phần tử HTML) được chia thành những loại nào?

<p>Khối và nội tuyến (B)</p> Signup and view all the answers

Thuộc tính nào trong CSS kiểm soát khoảng cách giữa nội dung và đường viền của một phần tử?

<p>padding (B)</p> Signup and view all the answers

Thuộc tính nào sau đây chỉ áp dụng cho phần tử dạng khối?

<p>width (C)</p> Signup and view all the answers

Để áp dụng định dạng cho tất cả các phần tử có tên lớp đồng thời là product và beauty, em cần thiết lập bộ chọn lớp CSS như thế nào?

<p>.product.beauty (C)</p> Signup and view all the answers

Cho mẫu CSS sau: h1 {padding: 5px 10px 3px 20px;}. Phát biểu nào sau đây ĐÚNG?

<p>padding-right = 10px (C)</p> Signup and view all the answers

Nếu một phần tử có width: 200px, margin: 15px, padding: 10px, và không có đường viền, thì khoảng cách tổng cộng từ cạnh trái đến cạnh phải của phần tử (bao gồm cả margin) là bao nhiêu?

<p>250px (C)</p> Signup and view all the answers

Flashcards

What is padding?

Defines the space between the content and the border of an element.

What is margin?

Defines the space outside the border of an element, creating a gap between the element and other elements.

What are HTML element display types?

Elements are either block (occupy full width) or inline (occupy only the space they need).

What is the order of padding values? (CSS)

With this formatting, the padding values are assigned clockwise: top, right, bottom, left.

Signup and view all the flashcards

What is a CSS Class Selector?

CSS class selectors apply styles to HTML elements that have the specified class attribute.

Signup and view all the flashcards

What is a CSS ID Selector?

CSS ID selectors apply styles to a single, unique HTML element identified by its id attribute.

Signup and view all the flashcards

What does padding control?

The amount of space from the content edge to the visual border of a element.

Signup and view all the flashcards

Study Notes

  • HTML elements can be modified using the display property.
  • The padding property defines the space from the text to the border of a frame.
  • The correct way to set up a format style with corresponding IDs is #idname {property: value;}.
  • HTML elements consist of block and inline types.
  • The padding property manages the space between an element's content and its border.
  • Block-level elements can only utilize the width property.
  • To apply formatting to all elements with both "product" and "beauty" class names, use .product.beauty.
  • Given the CSS sample h1 {padding: 5px 10px 3px 20px;}, the correct interpretation is padding-right = 10px.
  • For an element with width: 200px, margin: 15px, and padding: 10px without a border, the total distance from the left edge to the right edge (including margin) amounts to 250px.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

CSS Syntax and Selectors Quiz
4 questions

CSS Syntax and Selectors Quiz

PleasingGreatWallOfChina avatar
PleasingGreatWallOfChina
Understanding HTML Basics Quiz
10 questions
HTML and CSS Key Elements Quiz
5 questions

HTML and CSS Key Elements Quiz

ExaltingVerisimilitude avatar
ExaltingVerisimilitude
Fundamentele HTML, CSS și Comprimare Video
20 questions
Use Quizgecko on...
Browser
Browser