Câu hỏi phỏng vấn HTML
Câu hỏi

Describe the differenc...

Câu trả lời

In HTML, spaces are handled differently than in typical word processing programs, and there are specific entities used to manage spacing within HTML documents. The entities  ,  , and   are used to insert spaces of different widths. Here's a detailed explanation of each:

  (Non-Breaking SPace)

The   entity stands for non-breaking space. It is used to create a space between words that cannot be separated by a line break. This is particularly useful in preventing browsers from breaking up specific parts of text that you want to keep together on one line, such as dates, names, or certain numerical values. For example, in "10 km" or "April 28", using   ensures that "10" and "km", or "April" and "28", are not split onto two different lines[6].

  (EN SPace)

The   entity represents a space that is roughly the width of a lowercase 'n' character in the current font size. It is wider than a   but narrower than an  . This type of space is useful when you need a bit more separation than a single non-breaking space, but not as much as an em space. It can be used for setting off elements within text where a full em space would be too wide[5].

  (EM SPace)

The `...

senior

senior

Gợi ý câu hỏi phỏng vấn

middle

Explain the difference between cookies, session and local storage

expert

Why is it generally a good idea to position CSS s between and JS s just before ? Do you know any
exceptions?

middle

Explain the difference between block elements and inline elements

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào