• Home
  • Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • ToSic.Razor.Blade
      • IHtmlTag
      • IHtmlTagsService
      • IScrub
      • Tag
      • Tags
      • Text
    • ToSic.Razor.Html5
      • A
      • Abbr
      • Address
      • Area
      • Article
      • Aside
      • Audio
      • B
      • Base
      • Bdi
      • Bdo
      • Blockquote
      • Br
      • Button
      • Canvas
      • Caption
      • Cite
      • Code
      • Col
      • Colgroup
      • Comment
      • Data
      • Datalist
      • Dd
      • Del
      • Details
      • Dfn
      • Dialog
      • Div
      • Dl
      • Dt
      • Em
      • Embed
      • Fieldset
      • Figcaption
      • Figure
      • Footer
      • Form
      • H1
      • H2
      • H3
      • H4
      • H5
      • H6
      • Head
      • Header
      • Hr
      • I
      • Icon
      • Iframe
      • Img
      • Input
      • Ins
      • Kbd
      • Label
      • Legend
      • Li
      • Link
      • Main
      • Map
      • Mark
      • Meta
      • MetaOg
      • Meter
      • Nav
      • Noscript
      • Object
      • Ol
      • Optgroup
      • Option
      • Output
      • P
      • Param
      • Picture
      • Pre
      • Progress
      • Q
      • Rp
      • Rt
      • Ruby
      • S
      • Samp
      • Script
      • ScriptJsonLd
      • Section
      • Select
      • Small
      • Source
      • Span
      • Strong
      • Style
      • Sub
      • Summary
      • Sup
      • Svg
      • Table
      • Tbody
      • Td
      • Template
      • Textarea
      • Tfoot
      • Th
      • Thead
      • Time
      • Tr
      • Track
      • U
      • Ul
      • Var
      • Video
      • Wbr
    • ToSic.Razor.Markup
      • Attribute
      • AttributeOptions
      • Attributes
      • ITag
      • Tag<T>
      • TagBase
      • TagChildren
      • TagCustom
      • TagList
      • TagOptions
      • TagText
    • ToSic.Razor.StartUp
      • StartUp

    Class Source

    Generate a standard HTML5 <source> tag

    Inheritance
    System.Object
    ToSic.Razor.Markup.RawHtmlString
    TagBase
    Tag<Source>
    Source
    Implements
    System.Web.IHtmlString
    IHtmlTag
    ITag
    System.Collections.Generic.IEnumerable<ITag>
    System.Collections.IEnumerable
    Inherited Members
    Tag<Source>.Attr(String, Object, String)
    Tag<Source>.Attr(Object)
    Tag<Source>.Id(String)
    Tag<Source>.Class(String)
    Tag<Source>.Style(String)
    Tag<Source>.Title(String)
    Tag<Source>.Data(String, Object)
    Tag<Source>.On(String, Object)
    Tag<Source>.Add(Object[])
    Tag<Source>.Wrap(Object[])
    Tag<Source>.AsHtmlTag()
    TagBase.IsImmutable
    TagBase.PreProcessNewChild(Object)
    TagBase.ApplyChanges(CloneChanges)
    TagBase.TagName
    TagBase.TagOptions
    TagBase.ToString()
    TagBase.TagAttributes
    TagBase.TagChildren
    TagBase.TagStart
    TagBase.TagEnd
    Namespace: ToSic.Razor.Html5
    Assembly: ToSic.Razor.dll
    Syntax
    public class Source : Tag<Source>, IRawHtmlString, IHtmlString, IHtmlTag, ITag, IEnumerable<ITag>, IEnumerable

    Methods

    | Improve this Doc View Source

    Media(String)

    Set the media attribute on the <source> tag

    Declaration
    public Source Media(string value)
    Parameters
    Type Name Description
    System.String value

    what should be in media='...'. If called multiple times, later values replace the previous value.

    Returns
    Type Description
    Source

    a Source object to enable fluid command chaining

    | Improve this Doc View Source

    Sizes(String)

    Set the sizes attribute on the <source> tag

    Declaration
    public Source Sizes(string value)
    Parameters
    Type Name Description
    System.String value

    what should be in sizes='...'. If called multiple times, later values replace the previous value.

    Returns
    Type Description
    Source

    a Source object to enable fluid command chaining

    | Improve this Doc View Source

    Src(String)

    Set the src attribute on the <source> tag Automatically url-encode it if contains spaces, umlauts or other unexpected chars

    Declaration
    public Source Src(string value)
    Parameters
    Type Name Description
    System.String value

    what should be in src='...'. If called multiple times, later values replace the previous value.

    Returns
    Type Description
    Source

    a Source object to enable fluid command chaining

    | Improve this Doc View Source

    Srcset(String)

    Set the srcset attribute on the <source> tag Automatically url-encode it if contains spaces, umlauts or other unexpected chars

    Declaration
    public Source Srcset(string value)
    Parameters
    Type Name Description
    System.String value

    what should be in srcset='...'. If called multiple times, later values replace the previous value.

    Returns
    Type Description
    Source

    a Source object to enable fluid command chaining

    | Improve this Doc View Source

    Srcset(String, Int32)

    Add another name/number pair to the srcset attribute on the <source> tag Automatically url-encode it if contains spaces, umlauts or other unexpected chars

    Declaration
    public Source Srcset(string name, int multiplier)
    Parameters
    Type Name Description
    System.String name

    image name

    System.Int32 multiplier

    what the images is for - numbers below 8 are used for resolution densities, larger numbers for pixel widths

    Returns
    Type Description
    Source

    a Source object to enable fluid command chaining

    | Improve this Doc View Source

    Type(String)

    Set the type attribute on the <source> tag

    Declaration
    public Source Type(string value)
    Parameters
    Type Name Description
    System.String value

    what should be in type='...'. If called multiple times, later values replace the previous value.

    Returns
    Type Description
    Source

    a Source object to enable fluid command chaining

    Implements

    System.Web.IHtmlString
    IHtmlTag
    ITag
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX