U.S. CitiesCity-Data Forum Index
Go Back   City-Data Forum > General Forums > Science and Technology > Internet
 [Register]
Please register to participate in our discussions with 2 million other members - it's free and quick! Some forums can only be seen by registered members. After you create your account, you'll be able to customize options and access all our 15,000 new posts/day with fewer ads.
View detailed profile (Advanced) or search
site with Google Custom Search

Search Forums  (Advanced)
Reply Start New Thread
 
Old 12-30-2014, 06:13 AM
 
4,366 posts, read 3,645,763 times
Reputation: 2928

Advertisements

This is probably site programming 101, but I've already admitted that I'm a novice. Sometimes I accidentally hit a button, or maybe combination of buttons, on my computer that pulls up the website in HTML and CSS code. I feel like looking at the codes might be a good way to better familiarize myself with these languages. Does anyone know which buttons to push?
Reply With Quote Quick reply to this message

 
Old 12-30-2014, 07:09 AM
 
Location: The Southern Sac's, NM
1,872 posts, read 2,992,996 times
Reputation: 2888
CTRL U
Or right-click menu: view page source (in firefox)

And, yes - it's a great way to learn HTML and CSS. You can also highlight the part you want to see, and select 'view selection source' if you don't want to look at the whole page of code.
Reply With Quote Quick reply to this message
 
Old 12-30-2014, 07:34 AM
 
4,366 posts, read 3,645,763 times
Reputation: 2928
Quote:
Originally Posted by NMNan View Post
CTRL U
Or right-click menu: view page source (in firefox)

And, yes - it's a great way to learn HTML and CSS. You can also highlight the part you want to see, and select 'view selection source' if you don't want to look at the whole page of code.
Thanks. This isn't the exact window I got earlier, but it is helpful.

Just out of curiosity, though. Which buttons do you need to push to get a split window to appear at the bottom of the screen with the words "DOM Explorer" and the CSS and HTML code displayed at the bottom?

While we are on the subject, aren't CSS and HTML found in different places? They aren't found in the same group of code, are they?
Reply With Quote Quick reply to this message
 
Old 12-30-2014, 08:12 AM
 
Location: Cleveland, Ohio
11,818 posts, read 13,959,030 times
Reputation: 8055
No they are not. There is usually just one css file that handles the whole site and multiple pages of html.
Reply With Quote Quick reply to this message
 
Old 12-30-2014, 08:16 AM
 
1,009 posts, read 1,561,593 times
Reputation: 846
F12
Reply With Quote Quick reply to this message
 
Old 12-30-2014, 08:17 AM
 
Location: Wandering.
3,545 posts, read 5,678,821 times
Reputation: 2654
Quote:
Originally Posted by kmb501 View Post
Thanks. This isn't the exact window I got earlier, but it is helpful.

Just out of curiosity, though. Which buttons do you need to push to get a split window to appear at the bottom of the screen with the words "DOM Explorer" and the CSS and HTML code displayed at the bottom?

While we are on the subject, aren't CSS and HTML found in different places? They aren't found in the same group of code, are they?
In Firefox "F12" brings up the developer console IIRC.

CSS and HTML can be separated (multiple files), or they can be in the same file.

Some sites will have the CSS inline, meaning it's scattered throughout the HTML.

It's generally considered best practice to separate the two.
Reply With Quote Quick reply to this message
 
Old 12-30-2014, 08:29 AM
 
4,366 posts, read 3,645,763 times
Reputation: 2928
Quote:
Originally Posted by Skunk Workz View Post
In Firefox "F12" brings up the developer console IIRC.

CSS and HTML can be separated (multiple files), or they can be in the same file.

Some sites will have the CSS inline, meaning it's scattered throughout the HTML.

It's generally considered best practice to separate the two.
Another really basic question, but F12 is only controlling the brightness of my computer screen, so there must be another button that I need to push as well...
Reply With Quote Quick reply to this message
 
Old 12-30-2014, 08:32 AM
 
Location: Cary, NC
34,300 posts, read 59,614,483 times
Reputation: 33341
In IE, right click on the screen and click, "View Source."
Reply With Quote Quick reply to this message
 
Old 12-30-2014, 08:55 AM
 
Location: Wandering.
3,545 posts, read 5,678,821 times
Reputation: 2654
Quote:
Originally Posted by kmb501 View Post
Another really basic question, but F12 is only controlling the brightness of my computer screen, so there must be another button that I need to push as well...
You are probably on a laptop, and the F keys do multiple things.

Usually the alternate functions are marked in blue (or some other color that doesn't appear on most of the keyboard), and there's a FN key somewhere that toggles those functions (usually down near the Shift or CTRL keys).

Alternately you can use any number of the shortcuts from this list to get to the developer tools:

https://developer.mozilla.org/en-US/...oard_shortcuts
Reply With Quote Quick reply to this message
 
Old 12-30-2014, 10:26 AM
 
4,366 posts, read 3,645,763 times
Reputation: 2928
Quote:
Originally Posted by Skunk Workz View Post
You are probably on a laptop, and the F keys do multiple things.

Usually the alternate functions are marked in blue (or some other color that doesn't appear on most of the keyboard), and there's a FN key somewhere that toggles those functions (usually down near the Shift or CTRL keys).

Alternately you can use any number of the shortcuts from this list to get to the developer tools:

https://developer.mozilla.org/en-US/...oard_shortcuts
Okay, so it is "FN" + "F12." Thanks. I was wondering how I got there. Now I can watch the codes change in real time as I interact with the page.
Reply With Quote Quick reply to this message
Please register to post and access all features of our very popular forum. It is free and quick. Over $68,000 in prizes has already been given out to active posters on our forum. Additional giveaways are planned.

Detailed information about all U.S. cities, counties, and zip codes on our site: City-data.com.


Reply
Please update this thread with any new information or opinions. This open thread is still read by thousands of people, so we encourage all additional points of view.

Quick Reply
Message:

Over $104,000 in prizes was already given out to active posters on our forum and additional giveaways are planned!

Go Back   City-Data Forum > General Forums > Science and Technology > Internet
Similar Threads
Follow City-Data.com founder on our Forum or

All times are GMT -6. The time now is 09:40 PM.

© 2005-2019, Advameg, Inc. · Please obey Forum Rules · Terms of Use and Privacy Policy · Bug Bounty

City-Data.com - Archive 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 - Top