Hi guys, working on the fashion blog project and I’m seeing an error note that I’ve never seen before “Special characters must be escaped”
Here’s the code… Lines 11 & 13 it’s flagging the ‘&’ symbol, one I wrote out myself and the other was a copy and paste direct from the lesson steps, it runs fine - just wondering if I’m missing something here? I had a quick look for escape on MDN but couldn’t find anything, the only relevant escape was a JS line that was depreciated.
<!DOCTYPE html>
<html>
<head>
<title>Everyday With Isa!</title>
</head>
<body>
<h1>An Insider's Guide To NYFW</h1>
<p>NYFW can be both amazingly fun & incredibly overwhelming, especially if you’ve never been. Luckily, I’m here to give you an insider’s guide and make your first show a pleasurable experience. By taking my tips and tricks, and following your gut, you’ll have an unforgettable experience!</p>
<h2>Getting Tickets & Picking the Shows</h2>
<h2>Dress for the Shows</h2>
</body>
</html>
Hi, In HTML, the ampersand (&) is a reserved character used to start an entity reference. Entity references are used to display special characters that have special meanings in HTML, such as < (less than), > (greater than), and others. To include the ampersand symbol in your HTML content without causing an error, you need to escape it using the HTML entity reference & . Here’s how you should modify the lines in question:
<!DOCTYPE html>
<html>
<head>
<title>Everyday With Isa!</title>
</head>
<body>
<h1>An Insider's Guide To NYFW</h1>
<p>NYFW can be both amazingly fun & incredibly overwhelming, especially if you’ve never been. Luckily, I’m here to give you an insider’s guide and make your first show a pleasurable experience. By taking my tips and tricks, and following your gut, you’ll have an unforgettable experience!</p>
<h2>Getting Tickets & Picking the Shows</h2>
<h2>Dress for the Shows</h2>
</body>
</html>
No problem happy to have been useful, actually I’m not enrolled in that course so I don’t know if it has been mentioned or not but that’s not a problem
Probably you didn’t miss that. In most cases you don’t need to escape ampersands between the html tags because you would use UTF-8 encoding in a website:
<head>
<meta charset="UTF-8">
</head>
The current standard HTML5 uses this encoding by default, so you don’t have to bother about escaping special characters: