00:00music
00:11Translator
00:13In this kingdom, a craft
00:15S decreasing
00:16هятلاقفل الترازي
00:19or the phone
00:20And his poverty
00:21What works
00:22He threw
00:23Olaqam
00:24We must pay attention
00:25For a state, definitely
00:25We continue
00:26Olaqam
00:27Your success
00:28how to inspect HTML by using the browser developer tools inside nearly all modern desktop browsers a
00:36Special hidden area provides key information about a website's code and its current operational
00:41performance master these and you'll diagnose web issues like a tech expert hopefully with better
00:47coffee breath let us carefully observe them using the Firefox browser here we currently possess a
00:53a working sample within CodePen
00:55that effectively merges a multitude of the HTML elements
00:58we have previously studied.
01:00We shall proceed to launch this CodePen
01:02sample directly into a completely fresh tab,
01:05thereby displaying solely the interactive sample,
01:08not every single piece of the CodePen online portal.
01:11Now, we will gently select the context menu
01:14on this particular item,
01:16then choose the Inspect Element option
01:18and subsequently launch the designated Inspect Tools.
01:21This specific action conveniently unveils the comprehensive Developer Tools interface.
01:27Along the entire upper section here, numerous other distinct tabs are present,
01:32Systematically presenting sheet after sheet of widely varied utilities and functions.
01:37Just as we carefully described before,
01:40It truly is a central operational hub of available features and controls.
01:44However, let us consciously disregard all of that for the moment,
01:48and let us instead solely view the primary inspector window.
01:52We clearly have three separate panes visibly displayed for our use.
01:57On the far left side distinctly rests the HTML code.
02:00The exact central part is specifically reserved for CSS styling,
02:05And the corresponding right pane comfortably holds diverse extra choices and settings.
02:10We can actively select additional tabs located here to closely view the helpful planning tools,
02:15a detailed record of any recent edits made to CSS,
02:19and a dedicated pane concerning available fonts.
02:22But for the time being, we are definitely not going to thoughtfully consider this particular right pane,
02:27or indeed this specific middle pane intended for CSS just yet.
02:31Let us just carefully focus our attention exclusively upon the important left pane.
02:36This precise area clearly shows all of our HTML structure.
02:40Think of developer tools as a spaceship's dashboard.
02:44Tons of flashy buttons.
02:46For now, we're just finding the HTML inspector, our main screen.
02:51Don't get lost in hyperspace with CSS or other gadgets.
02:55We'll navigate those later, once we've mastered this star chart.
03:00We can observe here the DOM that the browser itself has constructed,
03:03which is known as the document object model.
03:06Firefox processed the HTML code that we provided to it,
03:10And later, it made certain revisions.
03:13The browser diligently attempted to correct any potential errors we might have inadvertently included,
03:18and then generated its own refined interpretation, the DOM version.
03:23We can clearly discern that the headline about HTML debugging
03:26is neatly enclosed within an H1 tag,
03:29and just underneath that, the common HTML issues section is designated as an H2.
03:34Moreover, we are able to notice that there are two distinct textual paragraphs present on the page.
03:41We observe a P element.
03:43However, rather than displaying the full text within the paragraph,
03:47it simply indicates this with a
03:49Additionally, there is a small triangular indicator position precisely in this location for expansion.
03:55We have the ability to click these triangular markers to expand them
03:58And thus reveal the content hidden within.
04:01We can see within the second paragraph that there is a SUP element
04:05used to format the numerical for the corresponding footnote.
04:09As we scroll further down the page,
04:11We can identify both a PRE element and also a black quote element.
04:16Contained directly within that black quote,
04:18We find there is a site element being utilized for attribution.
04:22The inspector tool is effectively visually representing the DOM tree structure at this point,
04:27which shows the hierarchical, or family tree, relationship of all elements,
04:32And this can be extremely helpful.
04:35A majority of modern web browsers, such as Safari, Chrome, and Edge,
04:39Come equipped with developer tools, and all of them feature an HTML panel
04:44that is very similar in function to this one.
04:46These tools consistently employ the same method for indenting code, elements,
04:51and utilize these small triangular icons to help users navigate and understand the complex DOM tree.
04:57We can leverage these developer tools to thoroughly inspect virtually any website available on the internet
05:02And essentially peek under the hood to observe how other experienced developers structure and use HTML.
05:09This is a frequently employed technique that we utilize in order to gather inspiration
05:13and practical ideas when we find ourselves uncertain about the most suitable markup
05:18or element to incorporation into our work.
05:21In such instances, we are generally inclined to shift our navigation
05:25towards other pre-existing websites for reliable reference information.
05:29We then try to locate content on those sites that bear a resemblance to the material we are attempting to markup
05:35and subsequently use the developer tools to ascertain precisely which HTML elements they have implemented.
05:41This approach is particularly insightful if the website being examined was constructed by a development team
05:47whose work and expertise we hold in high regard.
05:50Examining the tabular structure used in the work of others can significantly assist us
05:55in developing a more profound understanding of how to efficiently structure our own HTML documents
06:01documents in a manner that aligns with their established rules and principles.
06:05Consider the DOM as your personal HTML assistant,
06:09diligently correcting your typos in a manner similar to a digital butler
06:13who efficiently tidies up your mistakes.
06:15Developer tools are your all-access backstage pass to see this polished script
06:19and sneak a peek at how the pros craft their HTML blockbusters.
06:24It's like getting free coding lessons from your favorite websites.
06:27Legally, of course, no trench coats required.
06:30We might also skillfully apply the helpful HTML inspector and versatile dev tools
06:35to efficiently assist us when we need to debug any perplexing errors or common mistakes.
06:41Let us now carefully examine some specific code
06:43That unfortunately presents some kind of operational issue or clear problem with its current intended function.
06:50Here we currently have an unordered list which clearly contains four distinct entries
06:54and they really ought to be systematically tallying off in sequence.
06:58One, two, three, and four.
07:01Yet, if we closely view the displayed outcomes or final results,
07:05There unfortunately appears a completely vacant or blank one
07:09and this frustratingly misaligns the proper counting sequence.
07:13We consequently obtain a total of five separate entries instead of the expected four.
07:18Thus, we must ask,
07:20why is this unexpected behavior actually occurring within our structured list?
07:25Well, let us now gently right-select on this particular list item
07:29and then thoroughly review its underlying structure directly
07:32in the powerful developer tools provided by the browser.
07:36We can clearly note that, in actual truth,
07:38The web browser is proactively taking some corrective action
07:41to suitably mend or properly repair the HTML code
07:45that it originally got when it later formed the DOM tree.
07:49And the browser itself logically opens or firmly thinks
07:52that there indeed ought to be exactly five distinct entries present.
07:56One, then two, then a vacant spot, then three, finally followed by four.
08:02Thus, we must determine what exactly is truly arising
08:06or currently going on to cause this discrepancy here.
08:09Well, we can readily note that there is certainly an underlying issue
08:12definitely occurring just immediately prior
08:15to what truly ought to be correctly positioned third entry.
08:17And we also know the browser is automatically inserting yet more tags.
08:22It is evidently appending an entirely extra and quite unnecessary
08:26set of HTML tags into the document structure.
08:31Let us now carefully glance back at our very own initial HTML markup
08:35and meticulously locate a specific spot
08:38just before the intended third list item or overall term.
08:41Oh, we can now clearly spot it.
08:44The problematic source is now visible to us.
08:47We apparently told the web browser to inadvertently initiate another brand new list item,
08:53tag, exactly right here in this position.
08:55This was done rather than correctly telling it to formally cease
08:59or properly end the preceding one as it should have.
09:02Thus, let us now proceed to diligently mend or accurately fix that particular error in the code.
09:07If we carefully place the required forward slash character precisely where it is currently absent
09:13or notably missing, we can then clearly note now that it correctly performs as expected.
09:18The resulting DOM structure is now properly mended and displays the list items correctly.
09:24Whenever we are not entirely certain about what precisely is transpiring or going wrong with our code,
09:30We should confidently reach for the developer tools available in a browser to effectively resolve such issues out.
09:35Consider your browser's developer tools, the ultimate HTML detective.
09:40When your list counts like a confused sheep, 1, 2, blah, 3, 4,
09:46These tools reveal how the browser tried to shepherd your code, even if it added an extra sheep tag.
09:52Use them to spot your typos before your website starts speaking in riddles.
09:56It's like having a very patient, code-savvy friend who points out where you zigged instead of tack.
10:02You can find all the necessary files and exercises to practice with this video in the attached files.
Comments