How to use downloaded image or font(zip file) in CSS












0















A beginner question: I know how to use online image--copy paste in url but don't know how it works if downloaded. I downloaded the font as a zip file but I don't know what to put in the url, the same question for image. Thanks.



enter image description here










share|improve this question

























  • I don't understand your question. What are you copy pasting, and what's this about a font? Please add more detail and context.

    – laptou
    Nov 21 '18 at 23:59
















0















A beginner question: I know how to use online image--copy paste in url but don't know how it works if downloaded. I downloaded the font as a zip file but I don't know what to put in the url, the same question for image. Thanks.



enter image description here










share|improve this question

























  • I don't understand your question. What are you copy pasting, and what's this about a font? Please add more detail and context.

    – laptou
    Nov 21 '18 at 23:59














0












0








0








A beginner question: I know how to use online image--copy paste in url but don't know how it works if downloaded. I downloaded the font as a zip file but I don't know what to put in the url, the same question for image. Thanks.



enter image description here










share|improve this question
















A beginner question: I know how to use online image--copy paste in url but don't know how it works if downloaded. I downloaded the font as a zip file but I don't know what to put in the url, the same question for image. Thanks.



enter image description here







css3 custom-font






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '18 at 7:07









Nitin Bisht

1,1681418




1,1681418










asked Nov 21 '18 at 23:47









Emma ZhuEmma Zhu

1




1













  • I don't understand your question. What are you copy pasting, and what's this about a font? Please add more detail and context.

    – laptou
    Nov 21 '18 at 23:59



















  • I don't understand your question. What are you copy pasting, and what's this about a font? Please add more detail and context.

    – laptou
    Nov 21 '18 at 23:59

















I don't understand your question. What are you copy pasting, and what's this about a font? Please add more detail and context.

– laptou
Nov 21 '18 at 23:59





I don't understand your question. What are you copy pasting, and what's this about a font? Please add more detail and context.

– laptou
Nov 21 '18 at 23:59












3 Answers
3






active

oldest

votes


















0














Ok, sounds like you're trying to add images to a website. Your images need to be hosted somewhere to be used on a website.



When you use a URL of one that is already on the Internet, that image is hosted by someone else.



If you've downloaded it, you'll need to add it to your web project, which means you'll be hosting it yourself. It will then use a URL to reference the image and display it, but that URL will be on your own domain.



Depending on the software you're using to build this, sometimes you can drag and drop the image into your web page, and the software will do the rest.






share|improve this answer































    0














    Images on your website



    Like Andrew says, in order to use images in your website, the images should be on any place on the web.



    You can use Amazon S3 for storing your website images.
    https://aws.amazon.com/s3/.



    Once you get the image online url, you can use it on your html just pasting it on the src attribute of an img tag.



    <img src="url/of/the/image">


    Custom Fonts on your website



    Now, if you want to use a custom-font to your website, you should paste your font files into your website folder and create a css3 rule like below:



    @font-face {
    font-family: myfont;
    src: url(route/to/your/font/my_font.woff);
    }


    Then, if you want to use the font, for example on all you h2 tags:



    h2 {
    font-family: myfont;
    }


    Hope it will help you.






    share|improve this answer































      0














      As you a beginner I will explain everything to you step by step.



      In the beginning you must unzip the compressed file sansationlight.zip



      Right click on sansationlight.zip then click on Extract files



      enter image description here



      You will get the following window



      enter image description here



      Click on OK



      You will get sansationlight folder



      enter image description here



      Create a folder next to the index.html file and name it Fonts



      enter image description here



      enter image description here



      Copy the folder sansationlight that you unzip to the Fonts folder



      Copy



      enter image description here



      Paste in Fonts folder



      enter image description here



      Add the following style code to the style tag in the index.html file:



      @font-face {
      font-family: 'SansationLight';
      src: url('Fonts/SansationLight/SansationLight.eot');
      src: url('Fonts/SansationLight/SansationLight.eot?#iefix') format('embedded-opentype'),
      url('Fonts/SansationLight/SansationLight.woff') format('woff'),
      url('Fonts/SansationLight/SansationLight.ttf') format('truetype'),
      url('Fonts/SansationLight/SansationLight.svg#SansationLight') format('svg');
      font-weight: normal;
      font-style: normal;

      }

      div{
      font-family: 'SansationLight';
      }


      Here you will see how the code will appear on the your HTML page:



      enter image description here



      The result:



      enter image description here



      Here is the font before adding the style code:



      enter image description here



      If you want to use an external style file, follow these steps:



      After copying the sansationlight folder to Fonts folder, create another folder next to the Fonts folder, name it stylesheets



      enter image description here



      Inside the stylesheets folder, create the style.css file and open it.



      Copy the following code into the style.css file:



      @font-face {
      font-family: 'SansationLight';
      src: url('../Fonts/SansationLight/SansationLight.eot');
      src: url('../Fonts/SansationLight/SansationLight.eot?#iefix') format('embedded-opentype'),
      url('../Fonts/SansationLight/SansationLight.woff') format('woff'),
      url('../Fonts/SansationLight/SansationLight.ttf') format('truetype'),
      url('../Fonts/SansationLight/SansationLight.svg#SansationLight') format('svg');
      font-weight: normal;
      font-style: normal;

      }

      .mydiv{


      font-family: 'SansationLight';
      }



      Note, I've added ../ for one step back out of the stylesheets
      folder




      Here you see how the code will appear on the your style.css file:



      enter image description here



      To link the style.css file with index.html, use the link tag in index.html:



      <link rel="stylesheet" type="text/css" href="stylesheets/style.css">


      This is how the code will appear in the index.html file:



      enter image description here




      Note
      In the first way I made the font style for all divs
      div{ }



      In the second way, the class was used .mydiv




      For adding images:



      Create a folder next to the index.html file and name it images



      enter image description here



      Add the image you want to use to the images folder



      enter image description here



      Use the <img> tag to add an image



      <img src="images/image.jpg" style="width: 50%; height: 50%">


      enter image description here



      The result:



      enter image description here



      Useful Links:



      HTML Tutorial



      CSS Tutorial



      HTML, CSS and more



      HTML5 video Tutorial



      CSS3 video Tutorial



      The image I used






      share|improve this answer

























        Your Answer






        StackExchange.ifUsing("editor", function () {
        StackExchange.using("externalEditor", function () {
        StackExchange.using("snippets", function () {
        StackExchange.snippets.init();
        });
        });
        }, "code-snippets");

        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "1"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53422027%2fhow-to-use-downloaded-image-or-fontzip-file-in-css%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        0














        Ok, sounds like you're trying to add images to a website. Your images need to be hosted somewhere to be used on a website.



        When you use a URL of one that is already on the Internet, that image is hosted by someone else.



        If you've downloaded it, you'll need to add it to your web project, which means you'll be hosting it yourself. It will then use a URL to reference the image and display it, but that URL will be on your own domain.



        Depending on the software you're using to build this, sometimes you can drag and drop the image into your web page, and the software will do the rest.






        share|improve this answer




























          0














          Ok, sounds like you're trying to add images to a website. Your images need to be hosted somewhere to be used on a website.



          When you use a URL of one that is already on the Internet, that image is hosted by someone else.



          If you've downloaded it, you'll need to add it to your web project, which means you'll be hosting it yourself. It will then use a URL to reference the image and display it, but that URL will be on your own domain.



          Depending on the software you're using to build this, sometimes you can drag and drop the image into your web page, and the software will do the rest.






          share|improve this answer


























            0












            0








            0







            Ok, sounds like you're trying to add images to a website. Your images need to be hosted somewhere to be used on a website.



            When you use a URL of one that is already on the Internet, that image is hosted by someone else.



            If you've downloaded it, you'll need to add it to your web project, which means you'll be hosting it yourself. It will then use a URL to reference the image and display it, but that URL will be on your own domain.



            Depending on the software you're using to build this, sometimes you can drag and drop the image into your web page, and the software will do the rest.






            share|improve this answer













            Ok, sounds like you're trying to add images to a website. Your images need to be hosted somewhere to be used on a website.



            When you use a URL of one that is already on the Internet, that image is hosted by someone else.



            If you've downloaded it, you'll need to add it to your web project, which means you'll be hosting it yourself. It will then use a URL to reference the image and display it, but that URL will be on your own domain.



            Depending on the software you're using to build this, sometimes you can drag and drop the image into your web page, and the software will do the rest.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 22 '18 at 9:08









            Andrew JonesAndrew Jones

            366




            366

























                0














                Images on your website



                Like Andrew says, in order to use images in your website, the images should be on any place on the web.



                You can use Amazon S3 for storing your website images.
                https://aws.amazon.com/s3/.



                Once you get the image online url, you can use it on your html just pasting it on the src attribute of an img tag.



                <img src="url/of/the/image">


                Custom Fonts on your website



                Now, if you want to use a custom-font to your website, you should paste your font files into your website folder and create a css3 rule like below:



                @font-face {
                font-family: myfont;
                src: url(route/to/your/font/my_font.woff);
                }


                Then, if you want to use the font, for example on all you h2 tags:



                h2 {
                font-family: myfont;
                }


                Hope it will help you.






                share|improve this answer




























                  0














                  Images on your website



                  Like Andrew says, in order to use images in your website, the images should be on any place on the web.



                  You can use Amazon S3 for storing your website images.
                  https://aws.amazon.com/s3/.



                  Once you get the image online url, you can use it on your html just pasting it on the src attribute of an img tag.



                  <img src="url/of/the/image">


                  Custom Fonts on your website



                  Now, if you want to use a custom-font to your website, you should paste your font files into your website folder and create a css3 rule like below:



                  @font-face {
                  font-family: myfont;
                  src: url(route/to/your/font/my_font.woff);
                  }


                  Then, if you want to use the font, for example on all you h2 tags:



                  h2 {
                  font-family: myfont;
                  }


                  Hope it will help you.






                  share|improve this answer


























                    0












                    0








                    0







                    Images on your website



                    Like Andrew says, in order to use images in your website, the images should be on any place on the web.



                    You can use Amazon S3 for storing your website images.
                    https://aws.amazon.com/s3/.



                    Once you get the image online url, you can use it on your html just pasting it on the src attribute of an img tag.



                    <img src="url/of/the/image">


                    Custom Fonts on your website



                    Now, if you want to use a custom-font to your website, you should paste your font files into your website folder and create a css3 rule like below:



                    @font-face {
                    font-family: myfont;
                    src: url(route/to/your/font/my_font.woff);
                    }


                    Then, if you want to use the font, for example on all you h2 tags:



                    h2 {
                    font-family: myfont;
                    }


                    Hope it will help you.






                    share|improve this answer













                    Images on your website



                    Like Andrew says, in order to use images in your website, the images should be on any place on the web.



                    You can use Amazon S3 for storing your website images.
                    https://aws.amazon.com/s3/.



                    Once you get the image online url, you can use it on your html just pasting it on the src attribute of an img tag.



                    <img src="url/of/the/image">


                    Custom Fonts on your website



                    Now, if you want to use a custom-font to your website, you should paste your font files into your website folder and create a css3 rule like below:



                    @font-face {
                    font-family: myfont;
                    src: url(route/to/your/font/my_font.woff);
                    }


                    Then, if you want to use the font, for example on all you h2 tags:



                    h2 {
                    font-family: myfont;
                    }


                    Hope it will help you.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 22 '18 at 17:37









                    degreerichidegreerichi

                    263




                    263























                        0














                        As you a beginner I will explain everything to you step by step.



                        In the beginning you must unzip the compressed file sansationlight.zip



                        Right click on sansationlight.zip then click on Extract files



                        enter image description here



                        You will get the following window



                        enter image description here



                        Click on OK



                        You will get sansationlight folder



                        enter image description here



                        Create a folder next to the index.html file and name it Fonts



                        enter image description here



                        enter image description here



                        Copy the folder sansationlight that you unzip to the Fonts folder



                        Copy



                        enter image description here



                        Paste in Fonts folder



                        enter image description here



                        Add the following style code to the style tag in the index.html file:



                        @font-face {
                        font-family: 'SansationLight';
                        src: url('Fonts/SansationLight/SansationLight.eot');
                        src: url('Fonts/SansationLight/SansationLight.eot?#iefix') format('embedded-opentype'),
                        url('Fonts/SansationLight/SansationLight.woff') format('woff'),
                        url('Fonts/SansationLight/SansationLight.ttf') format('truetype'),
                        url('Fonts/SansationLight/SansationLight.svg#SansationLight') format('svg');
                        font-weight: normal;
                        font-style: normal;

                        }

                        div{
                        font-family: 'SansationLight';
                        }


                        Here you will see how the code will appear on the your HTML page:



                        enter image description here



                        The result:



                        enter image description here



                        Here is the font before adding the style code:



                        enter image description here



                        If you want to use an external style file, follow these steps:



                        After copying the sansationlight folder to Fonts folder, create another folder next to the Fonts folder, name it stylesheets



                        enter image description here



                        Inside the stylesheets folder, create the style.css file and open it.



                        Copy the following code into the style.css file:



                        @font-face {
                        font-family: 'SansationLight';
                        src: url('../Fonts/SansationLight/SansationLight.eot');
                        src: url('../Fonts/SansationLight/SansationLight.eot?#iefix') format('embedded-opentype'),
                        url('../Fonts/SansationLight/SansationLight.woff') format('woff'),
                        url('../Fonts/SansationLight/SansationLight.ttf') format('truetype'),
                        url('../Fonts/SansationLight/SansationLight.svg#SansationLight') format('svg');
                        font-weight: normal;
                        font-style: normal;

                        }

                        .mydiv{


                        font-family: 'SansationLight';
                        }



                        Note, I've added ../ for one step back out of the stylesheets
                        folder




                        Here you see how the code will appear on the your style.css file:



                        enter image description here



                        To link the style.css file with index.html, use the link tag in index.html:



                        <link rel="stylesheet" type="text/css" href="stylesheets/style.css">


                        This is how the code will appear in the index.html file:



                        enter image description here




                        Note
                        In the first way I made the font style for all divs
                        div{ }



                        In the second way, the class was used .mydiv




                        For adding images:



                        Create a folder next to the index.html file and name it images



                        enter image description here



                        Add the image you want to use to the images folder



                        enter image description here



                        Use the <img> tag to add an image



                        <img src="images/image.jpg" style="width: 50%; height: 50%">


                        enter image description here



                        The result:



                        enter image description here



                        Useful Links:



                        HTML Tutorial



                        CSS Tutorial



                        HTML, CSS and more



                        HTML5 video Tutorial



                        CSS3 video Tutorial



                        The image I used






                        share|improve this answer






























                          0














                          As you a beginner I will explain everything to you step by step.



                          In the beginning you must unzip the compressed file sansationlight.zip



                          Right click on sansationlight.zip then click on Extract files



                          enter image description here



                          You will get the following window



                          enter image description here



                          Click on OK



                          You will get sansationlight folder



                          enter image description here



                          Create a folder next to the index.html file and name it Fonts



                          enter image description here



                          enter image description here



                          Copy the folder sansationlight that you unzip to the Fonts folder



                          Copy



                          enter image description here



                          Paste in Fonts folder



                          enter image description here



                          Add the following style code to the style tag in the index.html file:



                          @font-face {
                          font-family: 'SansationLight';
                          src: url('Fonts/SansationLight/SansationLight.eot');
                          src: url('Fonts/SansationLight/SansationLight.eot?#iefix') format('embedded-opentype'),
                          url('Fonts/SansationLight/SansationLight.woff') format('woff'),
                          url('Fonts/SansationLight/SansationLight.ttf') format('truetype'),
                          url('Fonts/SansationLight/SansationLight.svg#SansationLight') format('svg');
                          font-weight: normal;
                          font-style: normal;

                          }

                          div{
                          font-family: 'SansationLight';
                          }


                          Here you will see how the code will appear on the your HTML page:



                          enter image description here



                          The result:



                          enter image description here



                          Here is the font before adding the style code:



                          enter image description here



                          If you want to use an external style file, follow these steps:



                          After copying the sansationlight folder to Fonts folder, create another folder next to the Fonts folder, name it stylesheets



                          enter image description here



                          Inside the stylesheets folder, create the style.css file and open it.



                          Copy the following code into the style.css file:



                          @font-face {
                          font-family: 'SansationLight';
                          src: url('../Fonts/SansationLight/SansationLight.eot');
                          src: url('../Fonts/SansationLight/SansationLight.eot?#iefix') format('embedded-opentype'),
                          url('../Fonts/SansationLight/SansationLight.woff') format('woff'),
                          url('../Fonts/SansationLight/SansationLight.ttf') format('truetype'),
                          url('../Fonts/SansationLight/SansationLight.svg#SansationLight') format('svg');
                          font-weight: normal;
                          font-style: normal;

                          }

                          .mydiv{


                          font-family: 'SansationLight';
                          }



                          Note, I've added ../ for one step back out of the stylesheets
                          folder




                          Here you see how the code will appear on the your style.css file:



                          enter image description here



                          To link the style.css file with index.html, use the link tag in index.html:



                          <link rel="stylesheet" type="text/css" href="stylesheets/style.css">


                          This is how the code will appear in the index.html file:



                          enter image description here




                          Note
                          In the first way I made the font style for all divs
                          div{ }



                          In the second way, the class was used .mydiv




                          For adding images:



                          Create a folder next to the index.html file and name it images



                          enter image description here



                          Add the image you want to use to the images folder



                          enter image description here



                          Use the <img> tag to add an image



                          <img src="images/image.jpg" style="width: 50%; height: 50%">


                          enter image description here



                          The result:



                          enter image description here



                          Useful Links:



                          HTML Tutorial



                          CSS Tutorial



                          HTML, CSS and more



                          HTML5 video Tutorial



                          CSS3 video Tutorial



                          The image I used






                          share|improve this answer




























                            0












                            0








                            0







                            As you a beginner I will explain everything to you step by step.



                            In the beginning you must unzip the compressed file sansationlight.zip



                            Right click on sansationlight.zip then click on Extract files



                            enter image description here



                            You will get the following window



                            enter image description here



                            Click on OK



                            You will get sansationlight folder



                            enter image description here



                            Create a folder next to the index.html file and name it Fonts



                            enter image description here



                            enter image description here



                            Copy the folder sansationlight that you unzip to the Fonts folder



                            Copy



                            enter image description here



                            Paste in Fonts folder



                            enter image description here



                            Add the following style code to the style tag in the index.html file:



                            @font-face {
                            font-family: 'SansationLight';
                            src: url('Fonts/SansationLight/SansationLight.eot');
                            src: url('Fonts/SansationLight/SansationLight.eot?#iefix') format('embedded-opentype'),
                            url('Fonts/SansationLight/SansationLight.woff') format('woff'),
                            url('Fonts/SansationLight/SansationLight.ttf') format('truetype'),
                            url('Fonts/SansationLight/SansationLight.svg#SansationLight') format('svg');
                            font-weight: normal;
                            font-style: normal;

                            }

                            div{
                            font-family: 'SansationLight';
                            }


                            Here you will see how the code will appear on the your HTML page:



                            enter image description here



                            The result:



                            enter image description here



                            Here is the font before adding the style code:



                            enter image description here



                            If you want to use an external style file, follow these steps:



                            After copying the sansationlight folder to Fonts folder, create another folder next to the Fonts folder, name it stylesheets



                            enter image description here



                            Inside the stylesheets folder, create the style.css file and open it.



                            Copy the following code into the style.css file:



                            @font-face {
                            font-family: 'SansationLight';
                            src: url('../Fonts/SansationLight/SansationLight.eot');
                            src: url('../Fonts/SansationLight/SansationLight.eot?#iefix') format('embedded-opentype'),
                            url('../Fonts/SansationLight/SansationLight.woff') format('woff'),
                            url('../Fonts/SansationLight/SansationLight.ttf') format('truetype'),
                            url('../Fonts/SansationLight/SansationLight.svg#SansationLight') format('svg');
                            font-weight: normal;
                            font-style: normal;

                            }

                            .mydiv{


                            font-family: 'SansationLight';
                            }



                            Note, I've added ../ for one step back out of the stylesheets
                            folder




                            Here you see how the code will appear on the your style.css file:



                            enter image description here



                            To link the style.css file with index.html, use the link tag in index.html:



                            <link rel="stylesheet" type="text/css" href="stylesheets/style.css">


                            This is how the code will appear in the index.html file:



                            enter image description here




                            Note
                            In the first way I made the font style for all divs
                            div{ }



                            In the second way, the class was used .mydiv




                            For adding images:



                            Create a folder next to the index.html file and name it images



                            enter image description here



                            Add the image you want to use to the images folder



                            enter image description here



                            Use the <img> tag to add an image



                            <img src="images/image.jpg" style="width: 50%; height: 50%">


                            enter image description here



                            The result:



                            enter image description here



                            Useful Links:



                            HTML Tutorial



                            CSS Tutorial



                            HTML, CSS and more



                            HTML5 video Tutorial



                            CSS3 video Tutorial



                            The image I used






                            share|improve this answer















                            As you a beginner I will explain everything to you step by step.



                            In the beginning you must unzip the compressed file sansationlight.zip



                            Right click on sansationlight.zip then click on Extract files



                            enter image description here



                            You will get the following window



                            enter image description here



                            Click on OK



                            You will get sansationlight folder



                            enter image description here



                            Create a folder next to the index.html file and name it Fonts



                            enter image description here



                            enter image description here



                            Copy the folder sansationlight that you unzip to the Fonts folder



                            Copy



                            enter image description here



                            Paste in Fonts folder



                            enter image description here



                            Add the following style code to the style tag in the index.html file:



                            @font-face {
                            font-family: 'SansationLight';
                            src: url('Fonts/SansationLight/SansationLight.eot');
                            src: url('Fonts/SansationLight/SansationLight.eot?#iefix') format('embedded-opentype'),
                            url('Fonts/SansationLight/SansationLight.woff') format('woff'),
                            url('Fonts/SansationLight/SansationLight.ttf') format('truetype'),
                            url('Fonts/SansationLight/SansationLight.svg#SansationLight') format('svg');
                            font-weight: normal;
                            font-style: normal;

                            }

                            div{
                            font-family: 'SansationLight';
                            }


                            Here you will see how the code will appear on the your HTML page:



                            enter image description here



                            The result:



                            enter image description here



                            Here is the font before adding the style code:



                            enter image description here



                            If you want to use an external style file, follow these steps:



                            After copying the sansationlight folder to Fonts folder, create another folder next to the Fonts folder, name it stylesheets



                            enter image description here



                            Inside the stylesheets folder, create the style.css file and open it.



                            Copy the following code into the style.css file:



                            @font-face {
                            font-family: 'SansationLight';
                            src: url('../Fonts/SansationLight/SansationLight.eot');
                            src: url('../Fonts/SansationLight/SansationLight.eot?#iefix') format('embedded-opentype'),
                            url('../Fonts/SansationLight/SansationLight.woff') format('woff'),
                            url('../Fonts/SansationLight/SansationLight.ttf') format('truetype'),
                            url('../Fonts/SansationLight/SansationLight.svg#SansationLight') format('svg');
                            font-weight: normal;
                            font-style: normal;

                            }

                            .mydiv{


                            font-family: 'SansationLight';
                            }



                            Note, I've added ../ for one step back out of the stylesheets
                            folder




                            Here you see how the code will appear on the your style.css file:



                            enter image description here



                            To link the style.css file with index.html, use the link tag in index.html:



                            <link rel="stylesheet" type="text/css" href="stylesheets/style.css">


                            This is how the code will appear in the index.html file:



                            enter image description here




                            Note
                            In the first way I made the font style for all divs
                            div{ }



                            In the second way, the class was used .mydiv




                            For adding images:



                            Create a folder next to the index.html file and name it images



                            enter image description here



                            Add the image you want to use to the images folder



                            enter image description here



                            Use the <img> tag to add an image



                            <img src="images/image.jpg" style="width: 50%; height: 50%">


                            enter image description here



                            The result:



                            enter image description here



                            Useful Links:



                            HTML Tutorial



                            CSS Tutorial



                            HTML, CSS and more



                            HTML5 video Tutorial



                            CSS3 video Tutorial



                            The image I used







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Nov 22 '18 at 20:50

























                            answered Nov 22 '18 at 19:49









                            Husam EbishHusam Ebish

                            246217




                            246217






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53422027%2fhow-to-use-downloaded-image-or-fontzip-file-in-css%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Costa Masnaga

                                Fotorealismo

                                Sidney Franklin