1/14/15
8:35 am

Searching Inside Web Pages

You can quickly find information inside of long web pages using Safari's Find function. By default you are searching only for the letters at the start of words, but you can change this to search for any place the letters appear. You can also select some text in a web page and then search for other occurrences of that text.

Video Transcript (Click to Expand)
Hi, this is Gary with MacMost.com. On today's episode let me show you how you can search inside of a web page.

One of the key techniques you need to know to use when looking for information on the web is how to search. Not how to search the web. But how to search in a web page.

For instance, let's say we want to find out information about the War of 1812 but specifically you are thinking, well I want to find out I think the Star Spangled Banner was written, something to do with the War of 1812. So I do a search and there is a Wikipedia article. I'm going to end up with the huge Wikipedia article here that I can start at the beginning and start reading to find out if there is anything to do with the Star Spangled Banner.

Now I can kind of skim it and maybe go a little faster but there is no need to do any of that. I can easily search the contents of this very, very long web page. It is very easy to do this.

Let me show you where the menu command is. It is under Edit, under Find, and you've got Command F for find. Let's use that shortcut instead of the menu item because that is the quickest way to access this.

So we'll do Command F and it brings up this little extension to the title bar here where you've got a search field. We can start typing something in it. So let me start typing for Star Spangled Banner, let's type star dash s and you can see it does latch on here to the very first mention of it. But I can see there is actually seven mentions of it here and I can very easily move between all these mentions quickly with the arrow keys here.

You can see there is also those shortcuts. Under Find there was Command G for next and Shift Command G. So I can basically do Command F, type something, hit Return, and then Command G to go between them all. So I can get to the references to this text in this very long web page quickly with the Find function.

Now note you've got some options here. You've got two ways to search. You can search with Starts With or Contains. So the difference here is that the word must start with the text that you are typing. If it is found in the middle of the word it is not going to locate it.

Contains will actually do it the way that Safari used to work a couple versions ago where it would find text even if it was in the middle of the word. So you want to kind of be aware of this and do the one that you want.

For finding information like this they seem to work about the same. But if say you are a coder like I am sometimes you are looking for parts of functions and things like that. Then you actually want to use the Contains setting to have a more complete search of the entire page for that set of characters.

So, for instance, in this Wikipedia article on Organic chemistry if I were to do Command F and search for carbon I would see that there is thirty-two matches. If I go between these matches it is always the full word carbon or I might be able to find something where there is a word that starts with those letters.

If I change it to Contains you can see now it changes to forty matches and there is actually some appearances here of carbon as the second part of a word, like hydrocarbons right there.

Now if you ever want to find something without typing and you see the first instance of it, like for instance let's look at the word reactions here. I can select the word reactions in the text. Notice if I look under the Find menu here, I've got Use Selection for Find, Command E. So let's use Command E and it will quickly populate the search field here and do the search for us.

Then I can use Command G, or these arrows, to look at all of the instances of that word in the rest of the page.

Here's another example of how you can use this. Say you've got a DVD stuck in your DVD drive in an older Mac. You do a quick search for apple discussion eject dvd. You remember there is a terminal command for this. You just can't remember the exact command. So you do this search and come up with this discussion here. You want really quickly, you don't want to read all this stuff, you just want to find out what the terminal command is. So I'm just going to do Command F, type terminal, and it is going to jump right here. It is going to tell me there are two matches and here are the two matches. Jump right to the section of the page, pretty far down the page right in the middle, and there is the command.

So very quickly I can get to the information I want inside of a long page using the ability to find inside of a web page.

Comments: 8 Responses to “Searching Inside Web Pages”

    Doris
    1/14/15 @ 9:23 am

    Just wondering why you didn’t use the search bar on the page directly below the search bar you used?

      1/14/15 @ 9:30 am

      Not sure what you mean. The search bar below the search bar? There is a search field on Wikipedia pages, but that is just a way to search for another page on of Wikipedia, not for something inside the page you are viewing.

      Lindy
      1/15/15 @ 4:36 pm

      Doris… your way works on Wikipedia but not all web pages have a search field. Gary’s way works with all web pages.
      Thanks Gary for a great service you do for the Mac community!

    Steve Cantrell
    1/15/15 @ 9:14 am

    I just wanted to reach out and say thank you for all the videos that you do. I never thought I would need a function such as the one described in this video, but it seems very relevant on my daily work on the computer. Thank you and keep up the good videos!

      Janet
      1/15/15 @ 9:31 am

      Agreed! these videos are wonderful way to expand my use of my Mac. Today’s tip is one I used right away. Thank you

      Roylyn Parks
      1/15/15 @ 12:42 pm

      Amen! Always great videos!

    Scott Beattie
    1/15/15 @ 12:51 pm

    Very useful tutorial. I was not aware that there was a way to change the search from starts with to contains – nor that the search within page functionality had changed in the last few versions. This tip will greatly improve my search productivity.

    Kerrie Redgate
    1/15/15 @ 7:33 pm

    Once again you have expanded the usefulness of a topic that had seemed deceptively simple. Who would know these extra every-day functions were there?! Thank you, Gary!

Comments Closed.