Placeholder Image

字幕列表 影片播放

  • In HTML all kinds of whitespace characters are ignored. This means the page will render

  • the same no matter how we format the text and the text will contain no line breaks,

  • except when it wraps around the edge of the screen. To override this behavior we have

  • several elements available.

  • First, there is the break tag <br> that forcibly breaks a line of text and creates a newline.

  • A similar element is the paragraph <p>, which adds more vertical space than the break tag.

  • Its end tag is optional and we can align the paragraph using the align attribute. Valid

  • values for this attribute are left, right, center, and justify.

  • If we want to preserve the whitespace we can use the preformatted element <pre>. With this

  • element the text will appear exactly as it's typed in the document and it will be rendered

  • with a fixed-width typeface.

  • When we try to add more than one space character in a row these will also be collapsed. To

  • force spacing we need to use a non-breaking space (&nbsp;). This character cannot be typed

  • directly from the keyboard, instead we reference it using a notation that starts with an ampersand

  • (&) and end with a semicolon (;). This notation is used whenever we want to type a character

  • that has special meaning, such as the angle brackets.

  • Lastly, we have the comment which is a special kind of tag used only to include comments.

  • It may span multiple lines and can appear anywhere in the document.

In HTML all kinds of whitespace characters are ignored. This means the page will render

字幕與單字

單字即點即查 點擊單字可以查詢單字解釋

B1 中級

HTML教程--04--空白 (HTML Tutorial - 04 - Whitespace)

  • 35 6
    Pan-Shy Gang 發佈於 2021 年 01 月 14 日
影片單字