How To View the HTML Source in Google Chrome
Whether you are new to the web industry or a seasoned veteran, viewing the HTML source of different web pages is something you are likely to do many times over the course of your career.
For those new to web design and looking to learn, viewing a site's source code is one of the easiest ways to get started down that path. If you see something on a website and want to know how it was done, viewing the source is one way to do so.
Over the years, many web professionals have learned HTML simply by viewing the source of the web pages that they saw and were intrigued by. In addition to reading web design books or attending professional conferences, viewing a site's source code is a great way for beginners to learn HTML.
MORE THAN JUST HTML
One thing to remember is that source files can be very complicated (and the more complex the website you are viewing is, the more complex that site's code is likely to be). In addition to the HTML structure that makes up the page you are viewing, there will also be CSS (cascading style sheets) that dictate the visual appearance of that site as well as script files included along with the HTML. Don’t get frustrated if you can’t figure out what’s going on with that site immediately. Viewing the HTML source is just the first step in this process. With a little experience, you will begin to better understand how all these pieces fit together to create the website that you see in your browser.
STEP BY STEP INSTRUCTIONS
- Open the Google Chrome web browser (if you do not have Google Chrome installed, this is a free download)
- Navigate to the web page you would like to examine
- Right click the page and look at the menu that appears. From that menu, click "View page source".
- The source code for that page will now appear
- Alternatively, you can also use the keyboard shortcuts of CTRL + U on a PC to open a window with a site's source code displayed. On a Mac, this shortcut is Command + Alt + U.
DEVELOPER TOOLS
In addition to the simple "View page source" ability that Google Chrome offers, you can also take advantage of their excellent Developer Tools to dig even deeper into a site. These tools will allow you to not only see the HTML, but also the CSS that applies to view elements in that HTML document.
To use Chrome's developer tools:
- Open Google Chrome
- Navigate to the web page you would like to examine
- Click the icon with three lines in the upper right corner of the browser window
- From the menu, hover over "More tools" and then click "Developer tools"
- This will open a window that show the HTML source code on the left of the pane and the related CSS on the right.
- Alternatively, if you right click an element in a web page and select "Inspect" from the menu that appears, Chrome's developer tools will pop up and the exact element you have selected will be highlighted in the HTML with the corresponding CSS shown to the right.
IS VIEWING SOURCE CODE LEGAL?
Over the years, I have had many new web designers question whether it is acceptable to view a site's source code and use it in their education and work.
While copying a site's code wholesale and passing it off as your own on a site is certainly not acceptable, using that code as a springboard to learn from is actually how many advancements are made in this industry. In fact, you would be hard pressed to find a working web professional today who has not learned something by viewing a site's source!
In the end, web professionals learn from each other and often improve upon the work that they see and are inspired by, so do not hesitate to view a site's source code and use it as a learning tool.
(From thoughtgo)
How To View the HTML Source in Google Chrome的更多相关文章
- Google Chrome 源码下载地址 (Google Chrome Source Code Download)
1. Google Chrome 源码 SVN 地址:http://src.chromium.org/svn.包含有 Chrome.Gears.Webkit.GCC 等源码以及编译依赖工具.Chrom ...
- source.android.google && developer.android.google
https://source.android.google.cn/ https://developer.android.google.cn/ https://source.android.com/co ...
- 【读书笔记】https://source.android.google.cn/devices/bootloader
https://source.android.google.cn/devices/bootloader 本文主要记录aosp官网关于bootloader的相关资料 Bootloader A bootl ...
- CEF中文教程(google chrome浏览器控件) -- Windows下编译Chromium
CEF中文教程(google chrome浏览器控件) -- CEF简介 2013-04-10 16:48 42928人阅读 评论(4) 收藏 举报 分类: CEF(2) 目录(?)[+] ...
- 详解Google Chrome浏览器(操作篇)(一)
开篇概述 在上篇博客中详解Google Chrome浏览器(理论篇)一文中,主要讲解了Chrome 搜索引擎使用.Chrome安装和基本操作.Chrome 基本架构.多线程等原理性问题,这篇将重点讲解 ...
- 详解Google Chrome浏览器(操作篇)(下)
开篇概述 由于最近忙于公司产品的架构与研发,已经三个多月没有写博客了,收到有些朋友的来信,问为什么不及时更新博客内容呢,他们说他们正期待着某些内容.对此,非常抱歉,那么我在此也给各位朋友一些承诺,从即 ...
- 浅谈Google Chrome浏览器(操作篇)(上)
开篇概述 在上篇博客中详解Google Chrome浏览器(理论篇)一文中,主要讲解了Chrome 搜索引擎使用.Chrome安装和基本操作.Chrome 基本架构.多线程等原理性问题,这篇将重点讲解 ...
- High Performance Networking in Google Chrome
小结: 1. 小文件存储于一个文件中: 在内部,磁盘缓存(disk cache)实现了它自己的一组数据结构, 它们被存储在一个单独的缓存目录里.其中有索引文件(在浏览器启动时加载到内存中),数据文件( ...
- 【ASP.NET MVC系列】浅谈Google Chrome浏览器(操作篇)(下)
ASP.NET MVC系列文章 [01]浅谈Google Chrome浏览器(理论篇) [02]浅谈Google Chrome浏览器(操作篇)(上) [03]浅谈Google Chrome浏览器(操作 ...
随机推荐
- Ico初步理解
Ico定义:是一个重要的面向对象编程的法则来削减计算机程序的耦合问题(解耦).通俗理解:把运行中程式的控制权从程式本身那里拿过来,放到配置文件中,通过"反射"找到匹配配置文件总的对 ...
- 【CF870F】Paths 分类讨论+数学
[CF870F]Paths 题意:一张n个点的图,对于点i,j(i!=j),如果gcd(i,j)!=1,则i到j有一条长度为1的无向边.令dis(i,j)表示从i到j的最短路,如果i无法到j,则dis ...
- python pytest测试框架介绍四----pytest-html插件html带错误截图及失败重测机制
一.html报告错误截图 这次介绍pytest第三方插件pytest-html 这里不介绍怎么使用,因为怎么使用网上已经很多了,这里给个地址给大家参考,pytest-html生成html报告 今天在这 ...
- stylie工具轻松搞定css3抛物线动画
自从CSS3引入了动画(transition和@keyframes,还有与之搭配的transform)之后,写动画也变的越来多越来越容易. 可是当我们遇到需要利用数学公式的复杂动画时,却一筹莫展,只能 ...
- Python3.6.3中,functools似乎不能用
用pip install安装时报编码错误: return s.decode(sys.__stdout__.encoding) UnicodeDecodeError: 'utf-8' codec can ...
- ECNU 3260 - 袋鼠妈妈找孩子
题目链接:http://acm.ecnu.edu.cn/problem/3260/ Time limit per test: 1.5 seconds Time limit all tests: 10. ...
- Node.js(daemon),tweak(debug ES)/nodejs forever,supervisor--express
http://www.cnblogs.com/Darren_code/p/node_express.html express -e nodejs-product sudo npm install fo ...
- 阿里云短信发送服务SDK-Python3
本文提供阿里云的短信发送服务SDK,使用Python3实现. # -*- coding: utf-8 -*- # pip install requests import requests import ...
- SEO工作中如何增加用户体验?10个细节要注意!
我们一直在做的网站SEO工作,如果你认为它的目的仅仅是为了提高网站的排名那就错了,还有一个同样很重要的方面就是增加用户的体验,使网站更加符合网民的浏览习惯,需要做到这个方面的成功我们有10个小细节是需 ...
- flask之表单验证 2018.12.23
#flask的消息闪现依赖于flash库,用户发送的请求方式存储在request模块中 #跳转依赖于redirect模块,还可以通过url_for方法来进行方法上的寻址 from flask impo ...