jQuery Selectors: Using meta or special characters

This entry is part 10 of 33 in the series jQuery Selectors

In the previous example, the image src url starts with https://codecrawl.com.

The 2 forward slashes // are meta characters.

If the image source has the below url, we would need to use escape character with 2 backslashes \\ in the selector.

<img src=’//codecrawl.com/code/images/ushuaia.jpg’>

The selector would need to be established as $(“img[src^=’\\/\\/code’]”).

<!DOCTYPE html>
<head lang='en'>
    <meta charset='UTF-8'>
    <script src='//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'></script>
        $(function () {
            $("img[src^='\\/\\/code']").css('height', '200px');


<p>Southernmost city in the world.</p>

<img src='//codecrawl.com/code/images/ushuaia.jpg'>



HTML: Applying bold and italic formatting

This entry is part 3 of 34 in the series HTML

Applying bold and italic styles are two ways of making text stand out and attract attention.

For simple boldface and italics, use the <b> tag and the <i> tag.

<!DOCTYPE html>
<head lang="en">
    <meta charset="UTF-8">
    <title>Bold & Italic</title>

<p>I have like to go to <b>Thailand</b> for fun.</p>
<p>And to have some <i>great times</i> there.</p>


Here I have used lang=’en’ to state that the page is using English language as its default language.

Here I have also used <meta charset=”UTF-8″> for character encoding.  This is recommended by W3C for use in HTML and XML.

UTF-8 has basically become the dominant character encoding for the World Wide Web.