DOUBT is not REBEL

Hi guys! how are you? well maybe this sounds pretty rebel but, why should i must put the code fragment before the “style” element? I refer, the url of the family font of Google…Is there other way to make it?

Hi @pabloeoliveros ,
Can you provide an example?

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>

Tipe like this! :point_up_2:

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).


To answer your question, that link element is what loads the font into your webpage. Without it, your code would not know where to find the font you are telling it to use. :slight_smile:

Wow! really thanks for the tip. well i understand the importance of the link but, the question is: cannot be putted on the link after the “style element” or it is necesary a configuration before that?.. Just like this :point_down:

<style> <link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

The <style> element is used to tell your HTML that the code within is going to be valid CSS instead of HTML. I am not 100% sure (since I have not tried), but I am fairly confident that the link element would not load properly if it was inside your <style> tags. :slight_smile:

1 Like

Thanks a lot! :smiley: :smiley: :smiley: :smiley: :smiley: :smiley: :smiley: :smiley: :smiley: :smiley: :smiley: :smiley: :smiley: :smiley: :smiley:

There are ways to import fonts inside style tags or css files, but not with the link tag

if you are interested in the topic you could try to do a bit of research

1 Like

OOOK!! Well, this post has been very helpfull. When one is new in all this its pretty cool know that the help is always there! :wink:

If i have other question (bout’ other theme) should i put it right here or…i must create a post only for that?

Its about this, idk why it doesn’t appears me the pink letters:

<style>
  body {
    background-color: black;
    font-family: monospace;
    color: green;

   pink-text {
     color: pink;
   }

</style>
<h1 class= "pink-text"> Hello World!</h1>

you are missing a }

but ideally you should use the Ask for help button for each challenge you need help for, as that would also include a challenge link and would attract more people willing to answer questions

Ok! haha let me try it