The Widget 'Custom HTML

  • Unknown's avatar

    My Site’s version is version 4.9.1–en_GB. I can’t save this HTML code to Custom HTML widget because of the message’errors’.

    <!DOCTYPE html>
    <html>
    <head>
    <title>Dushan</title>
    <link rel=’stylesheet’ href=’https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css’>
    <style>
    .fa-facebook-official{
    transition: all .2s ease-in-out;
    }
    .fa-facebook-official:hover {
    color: #3b5998;
    transform: scale(1.3);
    }
    .fa-google-plus-official{
    transition: all .2s ease-in-out;
    }
    .fa-google-plus-official:hover {
    color: #dd4b39;
    transform: scale(1.3);
    }
    .fa-twitter{
    transition: all .2s ease-in-out;
    }
    .fa-twitter:hover {
    color: #55acee;
    transform: scale(1.3);
    }
    .fa-linkedin{
    transition: all .2s ease-in-out;
    }
    .fa-linkedin:hover {
    color: #007bb5;
    transform: scale(1.3);
    }

    /*link colours*/
    a :link {
    color: grey;
    background-color: transparent;
    text-decoration: none;
    }
    a :visited {
    color: grey;
    background-color: transparent;
    text-decoration: none;
    }
    </style>
    <body>

        
    <i class=’fa fa-facebook-official’ style=’font-size: 55px;’></i>    

    <i class=’fa fa-google-plus-official’ style=’font-size: 55px;’></i>    

    <i class=’fa fa-twitter’ style=’font-size: 55px;’></i>    

    <i class=’fa fa-linkedin’ style=’font-size: 55px;’></i>    

    </body>
    </html>
    But I validate my code using vallidater.w3.org.it’s reply is ‘Document checking completed. No errors or warnings to show.’

    The blog I need help with is: (visible only to logged in users)

  • Hi there,

    I believe the error is being caused by the <style> tag.

    Note: Some HTML tags like script, iframe, form, input, and style are not available on Premium, Personal, or free plans. You need to upgrade to the WordPress.com Business Plan and install a custom plugin or theme to use them.

    To learn more, see the following support page: https://en.support.wordpress.com/widgets/custom-html-widget/

    Let us know if you need more help.

  • Hi there,

    Can you please confirm the site you’re working on? We don’t use version numbers on WordPress.com, so your reference to version 4.9.1 leads me to believe you might be using the open source WordPress.org software instead.

    Either way, the HTML widget is intended for posting small snippets of HTML, for example to embed a form or iframe (only possible on the Business Plan on WordPress.com), and HTML link, etc. The code you posted represents and entire HTML website. You cannot use that in an HTML widget in a site, as you can’t have an entire website inside another website.

  • Unknown's avatar

    Thank you for your valuable ideas

  • The topic ‘The Widget 'Custom HTML’ is closed to new replies.