Poojana Posted June 7, 2019 Share Posted June 7, 2019 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. Link to comment Share on other sites More sharing options...
Funce Posted June 9, 2019 Share Posted June 9, 2019 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 1 Link to comment Share on other sites More sharing options...
Ingolme Posted June 9, 2019 Share Posted June 9, 2019 There's also the problem that your code is using curly quotes instead of regular ones. You might need a different code editor. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now