Jump to content

Recommended Posts

Hi,

I recently started using html on a Mac. I noticed that using the double quotes for an attribute gives an error, as seen in the images attached. I faced the same problem while using the title attribute for the paragraph tag. The first double quote and the first world only were displayed as a tooltip.

Thank you.

Screen Shot 2019-06-07 at 11.56.04 AM.png

Link to post
Share on other sites

That would be because attributes aren't supposed to be surrounded in quotes. Only their values.

Also, the bgcolor attribute on your body is old, and should be replaced with background-color in your styling/css.

Try this on for size

<!DOCTYPE html>
<html>
  <head>
    <title>HTML page</title>
  </head>
  <body style="color: pink; background-color: black">
    <h1>Testing</h1>
    <h5>Heading 5</h5>
    <p title="Dummy text">
      Lorem Ipsum Dolor Sit Amet.
    </p>
  </body>
</html>

May I suggest looking into a code editor? I personally use Visual Studio Code

 

  • Thanks 1
Link to post
Share on other sites

There's also the problem that your code is using curly quotes instead of regular ones. You might need a different code editor.

  • Thanks 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...