交通大學校園電腦社群策進會
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- tags: HTML4 SPEC --- # Section 4: Conformance: requirements and recommendations [link](https://www.w3.org/TR/html401/conform.html) ## Table of contents - [Purpose](#Purpose) - [Definitions](#Definitions) - [SGML](#SGML) - [The text/html content type](#The-texthtml-content-type) ## Purpose Begin the specification of HTML 4, starting with the contract between: - authors - documents - users - user agents ## Definitions - **HTML documents** - an SGML document / application - **Author** - a person writes HTML documents - a program generates HTML documents - **HTML user agent** - any device that interprets HTML documents - visual browsers (text-only and graphical) - non-visual browsers (audio, Braille) ![](https://i.imgur.com/aSDx8g0.png =350x300) - conforming user agent - A user agent should avoid imposing arbitrary length limits on attribute value - A user agent must ensure that rendering is unchanged by the presence or absence of start tags and end tags when the HTML DTD indicates that these are optional - For reasons of backwards compatibility, we recommend that tools interpreting HTML 4 continue to support HTML 3.2 and HTML 2.0 - **User** - a person who interacts with a user agent to view, hear, or otherwise use a rendered HTML document - **Error conditions** - This specification does not define how conforming user agents handle general error conditions - recommended error handling behavior: - cannot recognize **element**: render the element's content - cannot recognize **attribute**: ignore the entire attribute - cannot recognize **attribute value**: use the default attribute value - encounters an **undeclared entity**: treated as character data ([Recap: HTML Entity](https://www.w3schools.com/html/html_entities.asp)) - **Deprecated** - Specification clearly indicate which are deprecated - Deprecated elements may become **obsolete** in future versions of HTML - User agents should continue to support deprecated elements - Example: - HTML presentational attributes have been deprecated when **style sheet** alternatives - **Obsolete** - obsolete element or attribute is one for which there is **no guarantee** of support by a user agent ## SGML :::info HTML 4 is an SGML application ::: - User agents must not render SGML processing instructions (e.g., \<?full volume\>) or comments (Refer to [SGML limited support](https://www.w3.org/TR/html401/appendix/notes.html#sgmlfeatures)) &nbsp; :::info HTML 4.01 specifies **three DTDs**, so authors must include one of the following **document type declarations** in their documents ::: - [HTML 4.01 Strict DTD](https://www.w3.org/TR/html401/sgml/dtd.html) - includes all elements and attributes that have not been deprecated or do not appear in frameset documents - `<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">` - [HTML 4.01 Transitional DTD](https://www.w3.org/TR/html401/sgml/loosedtd.html) - includes everything in the strict DTD plus deprecated elements and attributes (most of which concern visual presentation) - `<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">` - [HTML 4.01 Frameset DTD](https://www.w3.org/TR/html401/sgml/framesetdtd.html) - includes everything in the transitional DTD plus frames as well - `<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">` - **Compare: Strict DTD vs Transitional DTD** <pre> =================== Headings ========================================= There are six levels of headings from H1 (the most important) to H6 (the least important). <!ELEMENT (%heading;) - - (%inline;)* -- heading --> <!ATTLIST (%heading;) %attrs; -- %coreattrs, %i18n, %events -- > </pre> <pre> =================== Headings ========================================= There are six levels of headings from H1 (the most important) to H6 (the least important). <!ELEMENT (%heading;) - - (%inline;)* -- heading --> <!ATTLIST (%heading;) %attrs; -- %coreattrs, %i18n, %events -- <font color="#f00">%align; -- align, text alignment -- ></font> </pre> - **Compare: Transitional DTD vs Frameset DTD** <pre> <!ENTITY % HTML.Version "-//W3C//DTD HTML 4.01 Transitional//EN" -- Typical usage: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> ... </head> <body> ... </body> </html> </pre> <pre> <!ENTITY % HTML.Version "-//W3C//DTD HTML 4.01 <font color="#f00">Frameset</font>//EN" -- Typical usage: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 <font color="#f00">Frameset</font>//EN" "http://www.w3.org/TR/html4/<font color="#f00">frameset</font>.dtd"> <html> <head> ... </head> <font color="#f00"><frameset></font> ... <font color="#f00"></frameset></font> </html> </pre> ## The text/html content type HTML documents are sent over the Internet as a sequence of bytes accompanied by encoding information. A HTTP-message is either a request or a response: ``` HTTP-message = Request | Response ``` A HTTP-message has zero or more message-header⁠s and may have a message-body: ``` generic-message = start-line *(message-header CRLF) CRLF [ message-body ] ``` So not every HTTP-message has a message-body. But if it has a message-body, then that’s also the entity-body: ``` message-body = entity-body | <entity-body encoded as per Transfer-Encoding> ``` Entity Body (Request): ``` POST /foo HTTP/1.1 # Not part of the entity. Content-Type: text/plain # ┬ The entity is from this line down... Content-Length: 1234 # │ # │ Hello, World! ... # ┘ ``` Entity Body (Response): ``` HTTP/1.1 200 OK # Not part of the entity. Content-Length: 438 # ┬ The entity is from this line down... Content-Type: text/plain # │ # │ Response body ... # ┘ ``` :::info A message entity with a content type of "text/html" represents an HTML document. ::: The **content type** for HTML documents is defined as follows: - **Content type name**: text - **Content subtype name**: html - **Required parameters**: none - **Optional parameters**: charset - **Encoding considerations**: any encoding is allowed - **Security considerations**: See the notes on security &nbsp; :::info How to specify this information ? ::: ```php <?php header('Content-Type: text/html; charset=utf-8'); ... ?> ``` To address server or configuration limitations, HTML documents may include explicit information about the document's character encoding; the META element can be used to provide user agents with this information. ```htmlembedded <META http-equiv="Content-Type" content="text/html; charset=EUC-JP"> ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully