Prenumerera på innehåll

Skrivtips

  • Tillåtna HTML-taggar: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <abbr>

    Denna webbplats tillåter innehåll med HTML. Att lära sig HTML kan kännas som en övermäktig uppgift, men att lära sig de enklaste HTML-taggarna är mycket enkelt. Denna tabell ger exempel för varje tagg som är aktiv på webbplatsen.

    För mer information, se W3C:s HTML-specifikation eller använd en sökmotor för att hitta andra webbplatser som förklarar HTML.

    TaggbeskrivningDu skriverDu får
    Ankare används för att skapa länkar till andra sidor.<a href="http://www.mimetype.eu">mimeType</a>mimeType
    Betonat/kursivt<em>Betonat/kursivt</em>Betonat/kursivt
    Stark<strong>Stark</strong>Stark
    Citerat<cite>Citerat</cite>Citerat
    Kodad text som används för att visa programkällkod.<code>Kodat</code>Kodat
    Onumrerad lista - använd <li> för att påbörja varje ny post i listan<ul> <li>Första posten</li> <li>Andra posten</li> </ul>
    • Första posten
    • Andra posten
    Numrerad lista - använd <li> för att påbörja varje ny post i listan<ol> <li>Första posten</li> <li>Andra posten</li> </ol>
    1. Första posten
    2. Andra posten
    Definitionslistor liknar andra listor i HTML. <dl> inleder listan, <dt> inleder definitionstermen och <dd> inleder definitionsbeskrivningen.<dl> <dt>Första termen</dt> <dd>Första definitionen</dd> <dt>Andra termen</dt> <dd>Andra definitionen</dd> </dl>
    Första termen
    Första definitionen
    Andra termen
    Andra definitionen
    Blockciterat<blockquote>Blockciterat</blockquote>
    Blockciterat
    Förkortning<abbr title="Förkortning">Förkortn.</abbr>Förkortn.

    De flesta ovanliga tecken kan skrivas in direkt utan problem.

    Försök använda HTML-teckenenheter om du råkar ut för problem. Ett vanligt exempel är &amp; för ett &-tecken. En komplett lista över teckenenheter ("entities") finns på HTML entities. Några av de tillgängliga tecknen är:

    TeckenbeskrivningDu skriverDu får
    Tecknet &&amp;&
    Större än&gt;>
    Mindre än&lt;<
    Citationstecken&quot;"
  • Rader och stycken hanteras automatiskt. Radbrytningar (<br />) och taggar för stycken (<p> och </p>) sätts in automatiskt. Om stycken inte fungerar är det bara att lägga till ett par tomrader.
  • Syntax highlighting of source code can be enabled with the following tags:

    • Generic syntax highlighting tags: "<code>", "<blockcode>".
    • Language specific syntax highlighting tags: "<c>" for C source code, "<cpp>" for C++ source code, "<drupal5>" for Drupal 5 source code, "<drupal6>" for Drupal 6 source code, "<java>" for Java source code, "<javascript>" for Javascript source code, "<php>" for PHP source code, "<python>" for Python source code, "<ruby>" for Ruby source code.

    Options and tips:

    • The language for the generic syntax highlighting tags can be specified with one of the attribute(s): type, lang, language, class. The possible values are: "c" (for C), "cpp" (for C++), "drupal5" (for Drupal 5), "drupal6" (for Drupal 6), "java" (for Java), "javascript" (for Javascript), "php" (for PHP), "python" (for Python), "ruby" (for Ruby).
    • The supported tag styles are: <foo>, [foo].
    • Line numbering can be enabled/disabled with the attribute "linenumbers". Possible values are: "off" for no line numbers, "normal" for normal line numbers and "fancy" for fancy line numbers (every nth line number highlighted). The start line number can be specified with the attribute "start", which implicitly enables normal line numbering. For fancy line numbering the interval for the highlighted line numbers can be specified with the attribute "fancy", which implicitly enables fancy line numbering.
    • If the source code between the tags contains a newline (e.g. immediatly after the opening tag), the highlighted source code will be displayed as a code block. Otherwise it will be displayed inline.

    Defaults:

    • Default highlighting mode for generic syntax highlighting tags: when no language attribute is specified, no syntax highlighting will be done.
    • Default line numbering: no line numbers.

    Exempel:

    You typeYou get
    <code>foo = "bar";</code>Inline code with the default syntax highlighting mode.
    <code>
    foo = "bar";
    baz = "foz";
    </code>
    Code block with the default syntax highlighting mode.
    <code lang="python" linenumbers="normal">
    foo = "bar";
    baz = "foz";
    </code>
    Code block with syntax highlighting for Python source code
    and normal line numbers.
    <code language="python" start="23" fancy="7">
    foo = "bar";
    baz = "foz";
    </code>
    Code block with syntax highlighting for Python source code,
    line numbers starting from 23
    and highlighted line numbers every 7th line.
    <c>
    foo = "bar";
    baz = "foz";
    </c>
    Code block with syntax highlighting for C source code.
    <c start="23" fancy="7">
    foo = "bar";
    baz = "foz";
    <c>
    Code block with syntax highlighting for C source code,
    line numbers starting from 23
    and highlighted line numbers every 7th line.